This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
document.body.appendChild(function() { var e = document.createElement("input"); e.type="time"; e.style.position="absolute"; e.style.top="0px"; e.style.left="0px"; e.style.zIndex="1000"; return e; }()) |
# Convert `mymovie.mp4` to `mymovie.mov`, re-encoding. | |
ffmpeg -i mymovie.mp4 mymovie.mov | |
# Change `mymovie.mov` to `mymovie.mp4`, without re-encoding. | |
ffmpeg -i mymovie.mov -vcodec copy -acodec copy mymovie.mp4 | |
# Change `mymovie.mp4` to `mymovie-nosound.mp4`, dropping audio and re-encoding video to H.264 high quality | |
ffmpeg -i mymovie.mp4 -c:v libx264 -profile:v high -an mymovie-nosound.mp4 | |
# Resize `mymovie.mp4` to `mymovie-480.mp4`, setting width to 480px and keeping aspect ratio |
require 'net/https' | |
# Returns {"errors":[{"message":"Bad Authentication data","code":215}]} | |
# Issues a HTTPS request to: GET https://api.twitter.com/1.1/users/show.json?user_id=33978 | |
# Prints: Explicit SSL: #<Net::HTTPBadRequest:0x10b65f188> | |
uri = URI.parse("https://api.twitter.com/1.1/users/show.json?user_id=33978") | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
request = Net::HTTP::Get.new(uri.request_uri) |
# Install: | |
# curl https://gist.githubusercontent.com/kurrik/ec0a83cf568b9c16b8ce08dd407adf65/raw/.tmux.conf > ~/.tmux.conf | |
# | |
# Instructions: | |
# When nested, use an extra `ctrl-b` to issue commands to the nested session. | |
# E.g. to go to the next window `ctrl-b ctrl-b ctrl-n` | |
# Colors | |
set -g default-terminal "xterm-256color" |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
{ | |
"manifest_version": 2, | |
"name": "crx-widgetsjs", | |
"description": "Load Twitter's widgets.js in a Chrome extension", | |
"version": "1.0", | |
"permissions": [ | |
], | |
"browser_action": { |
function onFormSubmit(e) { | |
const itemResponses = e.response.getItemResponses(); | |
const formData = itemResponses.map((ir) => { | |
const i = ir.getItem(); | |
return { | |
'question': i.getTitle(), | |
'response': getResponse(ir), | |
}; | |
}); | |
const emailData = { |
# Print the currently configured account's test mode API key (in case you need to pass to a script / curl): | |
stripe config --list | awk '$1=="test_mode_api_key"{gsub(/"/, "", $3);print $3}' |
/** | |
* This script sends an email in response to form submissions. | |
* It formats metadata specified in the form and may be configured | |
* to send to different audiences depending on which options are | |
* chosen. The email is nicely formatted, suitable for ingestion | |
* into Slack. | |
**/ | |
/** CHANGE THE FOLLOWING TO MATCH YOUR FORM **/ |
/** | |
* Copyright 2020 Malte Ubl | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | |
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License |