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
var path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
config = { | |
entry: { | |
app: './app/scripts/main.js', | |
login: './app/scripts/login.js', | |
vendors: './app/scripts/vendors.js' |
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
➜ go-gtk git:(master) make | |
cd pango && go build && go install github.com/mattn/go-gtk/pango | |
package . | |
imports runtime: cannot find package "runtime" in any of: | |
/usr/local/go/bin/src/pkg/runtime (from $GOROOT) | |
/Users/jlebrech/gocode/src/runtime (from $GOPATH) | |
package . | |
imports runtime/cgo: cannot find package "runtime/cgo" in any of: | |
/usr/local/go/bin/src/pkg/runtime/cgo (from $GOROOT) | |
/Users/jlebrech/gocode/src/runtime/cgo (from $GOPATH) |
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
~ go get github.com/mattn/go-gtk/gtk | |
package github.com/mattn/go-gtk/gtk | |
imports fmt: unrecognized import path "fmt" | |
package github.com/mattn/go-gtk/gtk | |
imports runtime: unrecognized import path "runtime" | |
package github.com/mattn/go-gtk/gtk | |
imports runtime/cgo: unrecognized import path "runtime/cgo" | |
package github.com/mattn/go-gtk/gtk | |
imports unsafe: unrecognized import path "unsafe" | |
package github.com/mattn/go-gtk/gtk |
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
Show hidden characters
{ | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"hot_exit": false, | |
"remember_open_files": false, | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true |
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 'digest/sha2' | |
module GoogleAuthoriseHelper | |
def google_auth_url(user_id) | |
encoded_id = encode_id_and_store(user.id) | |
end | |
def encode_id_and_store(user_id) | |
sha256 = Digest::SHA2.new(256) |
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 'net/http' | |
require 'net/https' | |
require 'openssl' | |
file_path = File.expand_path(__FILE__) | |
path = File.dirname(file_path) | |
oauth_url = 'https://accounts.google.com/o/oauth2/auth' | |
url = URI.parse(oauth_url) |
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 Url < ActiveRecord::Base | |
def find_link(url) | |
link = link_finder(url) | |
EM::Run { | |
link.callback { | |
p "done" | |
} | |
} | |
end | |
end |
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 'em-http' | |
module LinkChecker | |
class LinkChecker | |
include EM::Deferrable | |
def initialize(url) | |
resp = Net::HTTP.get_response(url_address) | |
@status_code = resp.code.to_i |
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
... | |
resources :users do # should map "/:username" to user_controller/show | |
resources :favourites do # should send /:username/favourites, to favourite_controller/index | |
resources :fruit, :cars, :sports, :foods | |
end | |
end |
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
.. | |
form_for [current_user,@thing] | |
.. | |
# this creates the path | |
# /user/bob/things to post to | |
# but I would like the path | |
# /bob/things |
NewerOlder