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 | |
require 'sequel' | |
require 'logger' | |
require 'awesome_print' | |
DB = Sequel.sqlite | |
DB.create_table :people do | |
primary_key :id | |
String :name |
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 | |
require 'json' | |
require 'gherkin/parser' | |
filename = ARGV[0] | |
src = open(filename).read | |
parser = Gherkin::Parser.new | |
gherkin_document = parser.parse(src) | |
scenarios = gherkin_document[:feature][:children].select{|n| n[:type] == :Scenario} | |
line = gherkin_document[:feature][:location][:line] |
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
# Inverting Dependencies: Hexagonal Architecture | |
# A Blog post | |
class Post | |
def self.write_new_from(title, content) | |
new(title, content) | |
end | |
private |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
{ | |
"@context": "https://schema.org", | |
"@type": "Person", | |
"familyName": "Simpson" | |
} |
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
// License of this source is BSD License. | |
var GoldenScheme = function() { | |
// Get debug DOM | |
this.debugDom = document.getElementById("debug"); | |
if (this.debugDom == null) { | |
this.debugDom = document.body; | |
} | |
// Firefox 莉・螟門ッセ遲� | |
if(typeof(console) == "undefined") { | |
console = { |
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
Error in event handler for (unknown): TypeError: Cannot read property 'resp' of undefined | |
at chrome-extension://pnhplgjpclknigjpccbcnmicgcieojbh/js/content/diigolet.js:129:425 |
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
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get install -y build-essential git ruby-dev llvm-5.0-dev | |
RUN gem install bundler rake | |
RUN /bin/echo -e "source 'https://rubygems.org'\ngem 'ruby-llvm', git: 'https://github.com/ruby-llvm/ruby-llvm', ref: '889e97d'" >Gemfile | |
RUN bundle install | |
CMD bundle exec ruby /var/lib/gems/*/bundler/gems/ruby-llvm*/samples/hello.rb |
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
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get install -y build-essential ruby-dev llvm-3.5 wget | |
RUN gem install bundler rake | |
RUN /bin/echo -e "source 'https://rubygems.org'\ngem 'ruby-llvm'" >Gemfile | |
RUN bundle install | |
RUN wget -nv https://raw.githubusercontent.com/ruby-llvm/ruby-llvm/master/samples/hello.rb | |
CMD bundle exec ruby hello.rb |
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
#include <obnc/OBNC.h> | |
#include ".obnc/Gfx.h" | |
#include <stdbool.h> | |
#include "SDL.h" | |
SDL_Surface *screen; | |
SDL_Event event; | |
void Gfx_Do_(void) { | |
SDL_Init(SDL_INIT_VIDEO); |