NES30 | Mapped to |
---|---|
Up | c |
Down | d |
Left | e |
Right | f |
L | k |
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
javascript: navigator.clipboard.writeText( | |
Array.from(document.querySelectorAll("article")) | |
.map((entry) => { | |
const note = entry.querySelector("div > div > div:nth-child(2) > div:nth-child(3)").textContent; | |
return ( | |
entry.querySelector('a').href + | |
"\n" + | |
entry.querySelector('a').text + | |
"\n" + | |
(note ? note + "\n" : '') + |
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
function upload_to_cloudinary(uri) { | |
let timestamp = (Date.now() / 1000 | 0).toString() | |
let hash_string = 'timestamp=' + timestamp + cloudinary_config.api_secret | |
let signature = CryptoJS.SHA1(hash_string).toString() | |
let upload_url = 'https://api.cloudinary.com/v1_1/' + cloudinary_config.cloud_name + `/video/upload` | |
const formdata = new FormData() | |
formdata.append('file', {uri, type: 'video/mp4', name: 'upload.mp4'}) | |
formdata.append('eager', 'c_fill,h_1280,w_720|c_fill,h_853,w_480') | |
formdata.append('eager_async', 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
#!/bin/bash | |
# | |
# Run this script in a folder full of ".url" files, and pipe output to an HTML file. | |
# Example: ./convert_url_files_to_bookmarks.sh > bookmarks.html | |
echo "<!DOCTYPE NETSCAPE-Bookmark-file-1>" | |
echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">' | |
echo '<TITLE>Bookmarks</TITLE>' | |
echo '<H1>Bookmarks</H1>' | |
echo '<DL><p>' |
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 fake_redis = require("fakeredis"); | |
var QUEUE_NAME = 'incoming_mturk_events'; | |
var concurrency = 1; | |
var max_size = 10; | |
var kue = require('kue'); | |
var in_memory_queue = kue.createQueue({ | |
redis: { | |
createClientFactory: 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
from boto import connect_iam | |
iam_conn = connect_iam() | |
_dir = '/some/folder/' | |
cert_name = 'wildcard' | |
cert_chain = open(_dir + 'gd_bundle-g2-g1.crt').read() | |
cert_body = open(_dir + 'mysite.crt').read() | |
private_key = open(_dir + 'mysite.com.key').read() | |
path = '/cloudfront/' | |
print iam_conn.upload_server_cert(cert_name, cert_body, private_key, cert_chain, path) |
This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.
Here are the required steps to create a command:
-
Create a new Gist with a
command.js
andcommand.json
file, or simply fork this one. -
Write your JavaScript in
command.js
. This will be injected into and executed on the page the user is currently on when they run it. -
Add some metadata to the
command.json
file:
- name: The name of the command.
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
from boto.sqs.connection import SQSConnection | |
from boto.sqs.message import Message | |
import time | |
import simplejson as json | |
sqs_conn = SQSConnection(ACCESS, SECRET) | |
def _get_queue_by_name(name): | |
""" Gets existing queue; or makes one if it doesn't exist |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "coreos" | |
config.vm.box_url = "http://storage.core-os.net/coreos/amd64-generic/dev-channel/coreos_production_vagrant.box" | |
config.vm.network :private_network, :ip =>'0.0.0.0', :auto_network => true | |
config.vm.synced_folder ".", "/home/core/share", id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp'] | |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.provision "docker", | |
images: ["ubuntu"] | |
end |