This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env /home/gregpk/.rbenv/shims/ruby | |
# This script handles personal check for JIRA tickets. | |
# Currently it supports the following commands: | |
# - daily - output and open HTML report about the current tickets | |
# - breaching - check for breaching issues and notify if there are any | |
require 'bundler/inline' | |
require 'json' | |
require 'optparse' | |
require 'date' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'time' | |
filters = [] | |
configs = [] | |
hour = Time.now.hour | |
def is_weekend? | |
t = Time.now | |
t.saturday? || t.sunday? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jul 21 18:23:10 KeyPress event, serial 37, synthetic NO, window 0xa000001, | |
Jul 21 18:23:10 root 0x1f5, subw 0x0, time 11238404, (103,-1), root:(964,456), | |
Jul 21 18:23:10 state 0x10, keycode 133 (keysym 0xffed, Hyper_L), same_screen YES, | |
Jul 21 18:23:10 XLookupString gives 0 bytes: | |
Jul 21 18:23:10 XmbLookupString gives 0 bytes: | |
Jul 21 18:23:10 XFilterEvent returns: False | |
Jul 21 18:23:11 | |
Jul 21 18:23:11 KeyRelease event, serial 37, synthetic NO, window 0xa000001, | |
Jul 21 18:23:11 root 0x1f5, subw 0x0, time 11238752, (103,-1), root:(964,456), | |
Jul 21 18:23:11 state 0x50, keycode 133 (keysym 0xffed, Hyper_L), same_screen YES, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
MONTHS = 18 | |
CMD = 'git log --pretty="%an %ae%n%cn %ce" -- graphql_api | sort | uniq | wc -l' | |
# cloc . | grep Ruby | |
results = [] | |
MONTHS.times do |i| | |
date = (DateTime.now - (i*30)).strftime("%Y-%m-%d") | |
`git checkout \`git rev-list -n 1 --before="#{date} 00:00" master\` > /dev/null 2>&1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FileUploadComponent extends Component{ | |
upload(){ | |
this.props.mutate({ | |
variables: { | |
id, | |
avatar: this.inputFile.files[0] //this is how you send file | |
} | |
}). | |
then(({data}) => { | |
console.log(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
sink_output = `pacmd list-sinks` | |
sinks_index_lines = sink_output.each_line.select{|line| line =~ /index/} | |
sinks_indexes = sinks_index_lines.map{|index_line| Integer(index_line.strip.gsub(/[^\d]/,'')) } | |
# optional - for more descriptive notification message | |
card_names = sink_output.each_line.select{|line| line =~ /alsa.card_name/}.map{ |l| l.gsub(/.+ = "(.+)"/,'\1').strip } | |
card_names_dict = Hash[sinks_indexes.zip(card_names)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert appicon.png -resize 192x192\! drawable-xxxhdpi/appicon.png && \ | |
convert appicon.png -resize 144x144\! drawable-xxhdpi/appicon.png && \ | |
convert appicon.png -resize 96x96\! drawable-xhdpi/appicon.png && \ | |
convert appicon.png -resize 72x72\! drawable-hdpi/appicon.png && \ | |
convert appicon.png -resize 48x48\! drawable-mdpi/appicon.png && \ | |
convert appicon.png -resize 36x36\! drawable-ldpi/appicon.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StepMania v5.0 beta 4a crash report (build 0, 20141029 @ 10:32:04 PM CET (UTC+01:00)) | |
-------------------------------------- | |
Architecture: Unix | |
Crash reason: Segmentation fault - address not mapped at 0x0000000000000004 | |
Crashed thread: Main thread | |
Checkpoints: | |
Thread: Main thread | |
Profile.cpp:1626 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StepMania v5.0 beta 4a | |
Compiled 20141029 @ 10:32:04 PM CET (UTC+01:00) (build 0) | |
Log starting 2014-10-29 22:50:53 | |
Xlib: extension "RANDR" missing on display ":0". | |
Loading window: gtk | |
OS: Linux ver 030500 | |
Crash backtrace component: x86 custom backtrace | |
Crash lookup component: dladdr | |
Crash demangle component: cxa_demangle | |
Runtime library: glibc 2.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Guardfile for use with nodeschool (http://nodeschool.io/) | |
# (part 1 - learnyounode) | |
# verify solution when any js.file changed | |
guard :shell do | |
watch(/(.*).js/) {|m| `learnyounode verify #{m[0]}` } | |
end | |
NewerOlder