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
upstream faye_server { | |
server 127.0.0.1:9292; | |
} | |
server { | |
# listen 80; | |
listen 443 ssl; | |
server_name your-faye-server.com; |
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
import React from 'react'; | |
import useFeatureFlag from './useFeatureFlag'; | |
import RecommendationsComponent from './Recommendations.js'; | |
const { | |
DecoratedComponent: Recommendations, | |
featureEnabled: recommendationsFeatureEnabled, | |
FeatureFlag | |
} = useFeatureFlag({ | |
Component: RecommendationsComponent, |
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
const { filter, test, keys, fromPairs, map, match } = require('ramda'); | |
const env = dotenv.config({ path: ".env.local" }).parsed; | |
const featureKeys = filter(test(/^FEATURE/), keys(env)); | |
const FeatureFlags = fromPairs(map(key => [match(/FEATURE_([\w\W]+)/, key)[1], env[key]], featureKeys)); | |
module.exports = {plugins: [new webpack.DefinePlugin({ ...env, FeatureFlags })]}; | |
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 codeEval = document.createElement('div'); | |
var inputBox = document.createElement('textarea', { rows: 200, cols: 800 }); | |
var evalButton = document.createElement('button'); | |
var buttonText = document.createTextNode('Eval'); | |
evalButton.appendChild(buttonText); | |
codeEval.appendChild(inputBox); | |
codeEval.appendChild(evalButton); | |
document.body.insertBefore(codeEval, document.body.firstElementChild); | |
evalButton.addEventListener('click', function () { eval(inputBox.value)}); |
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
#!/bin/bash | |
# (optional) You might need to set your PATH variable at the top here | |
# depending on how you run this script | |
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Hosted Zone ID e.g. BJBK35SKMM9OE | |
ZONEID="enter zone id here" | |
# The CNAME you want to update e.g. hello.example.com |
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 AuthenticatedScraper | |
def initialize(args) | |
if args[:session] | |
@cookie_jar = args[:session] | |
@agent = Mechanize.new | |
@agent.cookie_jar = load_session(@cookie_jar) | |
else | |
@agent = Mechanize.new | |
@agent.login(args[:username], args[ password]) | |
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
tell application "iTunes" to activate | |
try | |
menu_click({"iTunes", "View", "Show Up Next"}) | |
on error | |
menu_click({"iTunes", "View", "Hide Up Next"}) | |
end try | |
-- `menu_click`, by Jacob Rus, September 2006 | |
-- | |
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}` | |
-- Execute the specified menu item. In this case, assuming the Finder |
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
paths=( | |
"/Applications/Postgres93.app/Contents/MacOS/bin" | |
"$PATH:$GOPATH/bin" | |
"/usr/local/bin" | |
"/usr/local/opt" | |
"/usr/local" | |
"/opt/chefdk/bin" | |
"$HOME/.node/bin" | |
"$NPM_PACKAGES/bin" | |
"/usr/local/sbin" |
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 Inject = { | |
externalCSS: function(href) { | |
var css = document.createElement('link'); | |
css.href = href; | |
css.type = 'text/css'; | |
css.rel = 'stylesheet'; | |
var head = document.getElementsByTagName('head')[0]; | |
head.appendChild(css); | |
}, | |
fontAwesome: function(){ |
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
# Chruby Default Gem Installer | |
# Install gems for all installed versions of ruby | |
# by Nick Prokesch | |
source /usr/local/share/chruby/chruby.sh | |
gems=( | |
bundler | |
homesick | |
mechanize |
NewerOlder