Skip to content

Instantly share code, notes, and snippets.

View dardo82's full-sized avatar
🏠
Working from home

Michele Venturi dardo82

🏠
Working from home
View GitHub Profile
@wm
wm / gist:1664077
Created January 23, 2012 16:22
iterm2 tmux
These release notes are for the development builds of iTerm2. The last stable release was 1.0.0.
iTerm2 1.0.0.20120108
You'd better sit down for this one.
Marquee Features
- Deep tmux integration!
Have you ever had an ssh session lost because you had to reboot, had a network failure, or the power went out? Are you tired of giving up a keystroke to tmux or screen? Suffer no longer! iTerm2 and tmux are now deeply integrated. By installing a special version of tmux, it gains the ability to speak directly to iTerm2. When you run tmux with -C, iTerm2 will open real, native windows or tabs for each tmux window. The whole state of your tmux session is reflected in native iTerm2 windows. As you interact with a window, your typing is sent back to tmux. Any time you resize a window, add a split pane, close a split pane, close a window, or open a window (with Shell->tmux->new window), that action happens in tmux as well as in iTerm2. Even your window positions and tabs are saved from session to session. For more
@vigo
vigo / free-memory.rb
Created January 27, 2012 18:00
"free" command for osx. Shows available memory
#!/usr/bin/env ruby
# encoding: utf-8
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel
# http://vigodome.com | http://ugur.ozyilmazel.com | http://github.com/vigo
def get_paged_memory_usage(match_string, paging=4096)
mvar = 3
if match_string.split(/[^\w]/).length > 1
mvar = 4
@alotaiba
alotaiba / google_text2speech.md
Created February 3, 2012 07:31
Google Text to Speech API

Google Text to Speech API

Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET requests.

GET

q
The query string to convert to audio

tl
Translation language, for example, ar for Arabic, or en-us for English

@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@nrk
nrk / command.txt
Created April 2, 2012 19:19
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
@biojazzard
biojazzard / ApplescriptQuicktimeFullScreen
Created May 29, 2012 15:53
Applescript Open a Movie in FullScreen
-- Version: QT 7 for OSX 10.6
on run
set unixpath to "/Volumes/Mac HD/Users/Movies/thefilm.mov"
set macfile to (POSIX file unixpath)
delay 1
tell application "QuickTime Player 7"
activate
delay 1
open file macfile
set looping of document 1 to true
@matthewhudson
matthewhudson / README.markdown
Created June 11, 2012 02:42
Application Icon Formats

App Icon Generator

Quickly generate web, mobile and social icons.

Introduction

Your new project needs icons. Different platforms have different icon guidelines. This project seeks to condense those requirements into a single script that handles all the technical guidelines.

Provide the script a single image and it will generate everything you need.

@jamesez
jamesez / gist:3085058
Created July 10, 2012 17:47
Build Chrome dmg
#!/bin/bash -ex
# Mount disk image on temp space
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse googlechrome.dmg | awk '/private\/tmp/ { print $3 } '`
echo Mounted on $mountpoint
# Determine version number
version=`defaults read "$mountpoint/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString`
echo Google Chrome version $version
@Angles
Angles / some iOS browser URI launching JS snippets.js
Last active October 8, 2023 18:57
"Open In" Bookmarklets for iOS
/* WITH MODS TO ORIG -- iOS Browser Bookmarklets to launch other apps and stuff */
/* ver 2014-04-14a */
/* backing up my "Open In" bookmarks */
// note iOS6 requires some changes to these
// BEGIN TESTING STUFF -- IN PROFRESS LIKELY NOT WORKING
// SOME WORK, MOST tests are not WORK --
// PINNER APP TEST STUFF (as a private one)
// the page title as the title and your selected text as the description.
@NapoleonWils0n
NapoleonWils0n / ffmpeg combine files.sh
Created November 4, 2012 00:26
ffmpeg: combine seperate audio and video files into a single video
#!/bin/sh
# ffmpeg combine seperate audio and video files into a single video
# copy the audio and video tracks
ffmpeg -i audio.aiff -i video.mov -acodec copy -vcodec copy -f mp4 avcombined.mp4
# encode the audio as aac and copy the video track without encoding it. if its the h264 codec
ffmpeg -i audio.aiff -i video.mov -acodec libfaac -ac 2 -ar 48000 -ab 160k -vcodec copy -f mp4 avcombined.mp4