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
// ==UserScript== | |
// @name Prefer Rich Diffs | |
// @namespace http://deecewan.com/ | |
// @version 0.1 | |
// @description default to rich diffs when they exist for a given filetype | |
// @author You | |
// @match https://github.com/* | |
// ==/UserScript== | |
(function() { |
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
// ==UserScript== | |
// @name Chat window changer | |
// @namespace http://deecewan.com | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author David Buchan-Swanson | |
// @match https://tanda.facebook.com/chat/t/* | |
// @grant none | |
// ==/UserScript== |
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
class Test { | |
constructor() { | |
this.scrollView = { | |
flash: () => { | |
console.log(this); | |
}, | |
doSomethingElse: () => { | |
console.log('*evil laugh*'); | |
this.scrollView = null; | |
}, |
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
module.exports = function transformer(file, api) { | |
const j = api.jscodeshift; | |
return j(file.source) | |
.find(j.VariableDeclaration) | |
.filter(d => d.value.declarations.length > 1) | |
.forEach(path => { | |
console.log(path) | |
const newDeclarations = path.value.declarations.map(dec => | |
j.variableDeclaration(path.value.kind, [ |
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
// this runs every time i get to the page. it updates the list of weeks, puts the old weeks at the bottom, | |
// and adds a label to this week. It runs using TamperMonkey | |
(async () => { | |
const promisify = fn => (...args) => new Promise((resolve, reject) => { | |
fn(...args, resolve, reject); | |
}); | |
// go to https://trello.com/app-key for the key | |
const token = '<ENTER KEY HERE>'; | |
const jquery = await import('https://code.jquery.com/jquery-3.3.1.min.js'); |
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 bash | |
typeset -a FLAVORS | |
#### | |
# This creates icons in all the necessary sizes for a react native project | |
# To use, simply set the variables after this block | |
# Note, this expects your standard icon to be named `icon.png`, and | |
# all flavor icons to be named `icon_<flavor>.png`. For example, | |
# `icon_dogfood.png` and `icon_nightly.png` |
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
function with_amazon_keys() { | |
local chosen_profile=$1 | |
if [ $# -gt 0 ]; then | |
shift; | |
fi; | |
local AWS_CREDENTIAL_LOCATION="$HOME/.aws/credentials" | |
local old_ifs="$IFS" | |
local IFS=$'\n' | |
local aws_credentials=("${(@f)$(cat $AWS_CREDENTIAL_LOCATION)}") |
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: node_modules/redux-persist/es/persistStore.js.flow:67 | |
67: persistor.purge = () => { | |
^^^^^ property `purge`. Property not found in | |
67: persistor.purge = () => { | |
^^^^^^^^^ object type | |
Error: node_modules/redux-persist/es/persistStore.js.flow:78 | |
78: persistor.flush = () => { | |
^^^^^ property `flush`. Property not found in | |
78: persistor.flush = () => { |
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
function doSomething() { | |
myVar = 3; | |
if (someCondition) { | |
myVar = 4; | |
} | |
} |
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
let myVar = 1; | |
function deleteIfBad() { | |
if (myVar > 1) { | |
deleteProductionDatabase(); | |
} | |
} |
NewerOlder