Skip to content

Instantly share code, notes, and snippets.

@JakeDawkins
JakeDawkins / test.js
Created May 1, 2018 01:56
Example of integration testing a GraphQL schema
import { schema } from '../my-schema';
// Docs for `graphql` function
// http://graphql.org/graphql-js/graphql/#graphql
import { graphql } from 'graphql';
it('executes a query that looks up some data', async () => {
// optionally create some fake context (i.e. data connectors)
const myFakeContext = { restConnectionOne: { findOne: jest.fn() } };
@kjaymiller
kjaymiller / text_to_things3.scptd
Last active October 7, 2021 22:24
AppleScript Import Text to Things3
on run {input, parameters}
set delimitedList to paragraphs of (input as string)
tell application "Things3"
repeat with currentTodo in reverse of delimitedList
set newToDo to make new to do with properties {name:currentTodo} at beginning of list "Inbox"
end repeat
end tell
end run
@shlomi-noach
shlomi-noach / slack-css-override.css
Last active November 16, 2017 12:51
Slack CSS override
/*
// Override Slack CSS
// Tested with Slack 2.8.2 Direct Download
// Instructions:
// - Append the following javascript code to:
// - /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js (MacOS/X)
// - /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js (Debian/Ubuntu)
@praveenperera
praveenperera / webpack.config.babel.js
Last active June 13, 2019 06:59
Webpack 2.0 for Phoenix (Elixir) working with sass (scss), Image files, CSS, Font Files and jQuery
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
const extractSass = new ExtractTextPlugin({
filename: "css/app.css"
});
export default {
@brntbeer
brntbeer / amsterdam-recs.md
Last active May 22, 2019 08:43
Amsterdam Recommendations. Pulled from a personal internal repo

Amsterdam Recos

If you are looking to get high, download the app "Greenmile" to find coffeeshops and smartshops near you! (only available on Android) Also, Boerejongens Coffeeshop is legit.

Jordaan

To Do:

  • Anne Frank Museum: tour of her house, always a huge line so book in advance and go on a weekday if you can.
@haileys
haileys / query.js
Last active November 21, 2017 06:41
function query<T>(selector: string, klass: Class<T>): T {
let element = document.querySelector(selector);
if (!(element instanceof klass)) {
throw new TypeError("expected " + selector + " to select element of type " + (klass : Function).name);
}
return element;
}
@mislav
mislav / netflix.sh
Last active February 21, 2024 16:56
Watch Netflix as if you were in the US by proxying DNS through a DigitalOcean instance.
#!/bin/bash
set -e
droplet=netflix
interface=Wi-Fi
us_regions=( nyc1 nyc2 nyc3 )
random_region() {
echo ${us_regions[RANDOM % ${#us_regions[@]}]}
}
@j8
j8 / disable all macos animations
Last active November 15, 2024 03:47
disable all macos animations for high performance
defaults write -g NSScrollViewRubberbanding -int 0
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSScrollAnimationEnabled -bool false
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g QLPanelAnimationDuration -float 0
defaults write -g NSScrollViewRubberbanding -bool false
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
@raamdev
raamdev / f.lux-xcode-master-sha256.chk
Last active November 20, 2015 21:49
38f463ee5780a4f2b0160f9fa21dbe3c78c5d80d3c093e4ff553aaca230e2898 f.lux-xcode-master.zip
5dfb0ac3bd39f2830283cd0a5af534c43024207bbec460ca089b8edd595070fa ./.gitignore
a326fb9457de2a31fd23fb98d89f1e83dcab611ea7b85f671680094592e51c54 ./[email protected]
d276420548696edcc16610b578907305f54020763e065581f4aa5863b8585c61 ./[email protected]
adab888cd5d24313f142e9324f10ff7128d77cb30031122bb3586e333ef399a2 ./[email protected]
8fdc77ccf3964c31eb31777479a7ca5c3c056d873da610f2d9b75c99fc363ae9 ./[email protected]
eb6f6aa969998b2648ade1ee051d37f01032e6f549fc77b195bf7e4c53bf2624 ./[email protected]
626b2f4146996ab876396c4ab797b005801fdf59aa6b57e976386f0572772895 ./[email protected]
eadf312d966754f3b8d6542ea8a5db850bcceb81e6f971b7b629bc4b950b8644 ./en.lproj/fluxController_iPhone.nib
9261ecceda608ef174256e5fdc774c1e6e3dcf533409c1bc393d490d01c713f1 ./en.lproj/InfoPlist.strings
ca34f2dc83c31222a73a48053532ad901de55f014c58ffa2fbcf6c202b5448b0 ./flux.beta/AppDelegate.h
#!/usr/bin/ruby -w
require "sexp_processor"
require "ruby_parser"
class AssertScanner < MethodBasedSexpProcessor
def self.run paths
paths = expand_dirs_to_files(*paths)
paths.each do |path|
# warn path