AT_PROMPT=1
# This will run before any command is executed.
function PreCommand() {
if [ -z "$AT_PROMPT" ]; then
return
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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'user'; | |
const authPass = 'pass'; |
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
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |
Short link to this page: caseywatts.com/quicktime
Other gists & tricks: http://caseywatts.com/gists-and-tricks
Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:
- the system output audio (from them)
- the microphone audio (from you)
- Open developer console
- Run following code
var cookieDate = new Date(); cookieDate.setFullYear(cookieDate.getFullYear( ) + 1); document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE; expires=" + cookieDate.toGMTString( ) + "; path=/";
- Click profile picture and switch to dark theme
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf
file and configure as so
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
require 'google/apis/analyticsreporting_v4' | |
require 'googleauth' | |
include Google::Apis::AnalyticsreportingV4 | |
include Google::Auth | |
VIEW_ID = "12345678" #your profile ID from your Analytics Profile | |
SCOPE = 'https://www.googleapis.com/auth/analytics.readonly' | |
@client = AnalyticsReportingService.new |
#OS X Movie to animated GIF
ffmpeg -i movie-name.mp4 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=0 --delay=3 > movie-name.gif
##Options
-r 10
tells ffmpeg to reduce the frame rate from 25 fps to 10-s 600x400
tells ffmpeg the max-width and max-height
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
## | |
# Usage -> python bitcoin_calculator.py [bitcoin amount] | |
# Example -> python bitcoin_calculator.py 0.2123 | |
## | |
import json | |
import os | |
import re | |
import sys | |
# Coinmon |
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
module Taggable | |
extend ActiveSupport::Concern | |
included do | |
attr_accessible :tags | |
after_save :set_tags | |
after_destroy :unset_tags | |
end |
NewerOlder