This file contains hidden or 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 String | |
MORSE_CODE = { | |
a: '.-', b: '-...', c: '-.-.', d: '-..', e: '.', f: '..-.', | |
g: '--.', h: '....', i: '..', j: '.---', k: '-.-', l: '.-..', | |
m: '--', n: '-.', o: '---', p: '.--.', q: '--.-', r: '.-.', s: '...', | |
t: '-', u: '..-', v: '...-', w: '.--', x: '-..-', y: '-.--', z: '--..' | |
} | |
def to_morse_code | |
self.downcase.each_char.map { |c| MORSE_CODE[c.to_sym] }.join |
This file contains hidden or 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
# Clickable Files by nofxx | |
"""files.py - Clickable Files URIs open in Emacs""" | |
import re | |
import terminatorlib.plugin as plugin | |
import subprocess | |
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE' | |
AVAILABLE = ['FileURLHandler'] | |
class FileURLHandler(plugin.URLHandler): |
This file contains hidden or 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
# | |
# CPP Rakefile | |
# | |
EXEC = "square" # Your app executable | |
FLAGS = "-Wall -Wextra" # Flags for building | |
EXTRA = %w{ OpenCV } # Extra includes | |
# | |
# Nothing to see here, move along... | |
# |
This file contains hidden or 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 | |
chunk = ARGV.join | |
head, line = chunk.split("&line=") | |
trash, file = head.split("file://") | |
file = file.gsub!("%2F", "/") | |
args = `ps aux | grep emac[s]` == "" ? "c" : "" |
This file contains hidden or 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
# | |
# Logstash conf! | |
# | |
input { | |
tcp { | |
host => "0.0.0.0" | |
port => 514 | |
type => syslog | |
} | |
udp { |
This file contains hidden or 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
# | |
# Fix bootstrap tabs! Go back in F5/reload/etc | |
# | |
doc.on 'created', '.tab-fix', -> | |
hash = document.location.hash; | |
if (hash) | |
$(@).find("a[href='#{hash}']").tab('show') | |
for link in $(@).find('a') | |
do (link) -> |
This file contains hidden or 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
# | |
# xConky settings | |
# | |
update_interval 2 | |
total_run_times 0 | |
net_avg_samples 1 | |
cpu_avg_samples 2 | |
imlib_cache_size 0 |
This file contains hidden or 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 'log4r' | |
require 'log4r/outputter/syslogoutputter' | |
require 'resque/failure/multiple' | |
require 'resque/failure/redis' | |
module Resque | |
module Failure | |
class Syslog < Base | |
# Define your logger, change as needed. |
This file contains hidden or 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
(type.ps) runlibfile | |
(unit.ps) runlibfile | |
(IsoLatin.enc) runlibfile | |
/default_encoding IsoLatin def | |
<< /Duplex false /Tumble false >> setpagedevice | |
/pagesize [595 842] def | |
/margin 3 dict def margin begin /top 1 cm def /right 1 cm def /bottom 1 cm def /left 1 cm def end | |
(paper.ps) runlibfile | |
[ /Producer (Ruby Ghostscript - RGhost v0.8.7) /DOCINFO pdfmark /rows_per_page 80 def /count_pages 10 def /row_height 0.4 cm def /row_padding 0.1 cm def (basic.ps) runlibfile | |
(cursor.ps) runlibfile |
This file contains hidden or 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
main() | |
int x = 1; | |
float y = 22.5; | |
char c = 'C'; | |
char[] = "Take this " + c + "!"; | |
printf("x to i: %d\n", x); |