(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
const copySelectedPhabs = () => { | |
let selection = window.getSelection(); | |
if (selection.rangeCount <= 0) { | |
return | |
} | |
const div = document.createElement('div') | |
Array.from(document.querySelectorAll('.phui-oi-frame')) | |
.filter(el => selection.containsNode(el, true)) | |
.forEach(el => { | |
const tmp = el.cloneNode(true) |
function (user, context, callback) { | |
user.app_metadata = user.app_metadata || {}; | |
if ('stripe_customer_id' in user.app_metadata) { | |
context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id; | |
return callback(null, user, context); | |
} | |
var stripe = require('stripe')('sk_....'); | |
var customer = { |
import type File from "File"; | |
import type FileService from "FileService"; | |
type FileDetailProps = { | |
file: File | |
}; | |
class FileDetail extends React.Component<FileDetailProps> { | |
render() { | |
// remove the file prop and flow will complain! |
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
atom.commands.add 'atom-text-editor', 'markdown:paste-as-link', -> | |
return unless editor = atom.workspace.getActiveTextEditor() | |
selection = editor.getLastSelection() | |
clipboardText = atom.clipboard.read() | |
selection.insertText("[#{selection.getText()}](#{clipboardText})") | |
atom.commands.add 'atom-text-editor', | |
'editor:toggle-current-row-folding': (event) -> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
#Each statement here is a blocking call, so we don't need explicit sleeping | |
#Our trusty local variables | |
ASST=ASST0 | |
INVOKE_PATH= | |
BASE_PATH= | |
#how2use |
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
#!/bin/bash | |
while read album | |
do | |
echo -e "Will download album $album" | |
google picasa get "$album" . | |
pushd "$album" | |
echo -e "Start to upload $album to Flickr" | |
find -type f|sort|xargs -I{} flickr_upload {} | |
popd |
For a few years now I've been trying to get emacs to alert me, somehow, to:
\t
)\r
)[ ]+$
)I've tried many strategies, but usually the result was something I found a little too intrusive, or difficult to manage.