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
package { | |
import flash.net.URLRequest; | |
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.media.SoundTransform; | |
public class Main extends MovieClip { | |
// timer for sound fade out |
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 'poppler' | |
require 'gdk_pixbuf2' | |
SCALE = 2 | |
filename = "source.pdf" | |
doc = Poppler::Document.new(filename) | |
page = doc.get_page(0) | |
# render the page to an in-memory buffer |
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 'grit' | |
repo = Grit::Repo.new("/Users/Caleb/Documents/Rails Projects/welcomemat") | |
# loop through all git commits | |
puts repo.commits.each do |commit| | |
puts commit.author #author | |
puts commit.authored_date #datestamp | |
puts commit.message #git commit message |
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 'capybara' | |
require 'capybara/dsl' | |
require 'capybara/mechanize' | |
module Parliament | |
class Question | |
attr_accessor :date, :number, :topic, :mp, :minister, :url | |
end |
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
[2] pry(main)> class Foo | |
[2] pry(main)* def initialize | |
[2] pry(main)* BAR = "something" | |
[2] pry(main)* end | |
[2] pry(main)* end | |
SyntaxError: (eval):4: dynamic constant assignment | |
BAR = "something" | |
^ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 'capybara' | |
require 'capybara/dsl' | |
require 'capybara/mechanize' | |
module Parliament | |
class Question | |
attr_accessor :date, :number, :topic, :mp, :minister, :url | |
end |
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
;; chruby | |
(require 'chruby) | |
(chruby "ruby-2.1.3") | |
;; copy envs | |
(require 'exec-path-from-shell) | |
(let ((envs '("PATH" "GOPATH" "GEM_HOME" "GEM_ROOT" "BUNDLE_PATH"))) | |
(exec-path-from-shell-copy-envs envs)) |
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
How's this for an idea - we build a crowd sourced community sandbox to upload | |
a CSV using a web form. Using a NoSQL database like MongoDB we could read the | |
header row of the CSV to create a collection with those fields. This means we | |
can get a basic JSON API for free (maybe paginated, etc) and with format | |
specifiers be able to download the original CSV again too. This would be | |
a set of URLs with a unique ID. | |
Maybe someone has already done something similar? |
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
[Unit] | |
Description=Alaveteli Sidekiq (%i) | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Restart=on-failure | |
RestartSec=10s |
OlderNewer