Skip to content

Instantly share code, notes, and snippets.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@JakubOboza
JakubOboza / say_to_file.markdown
Last active March 7, 2017 15:26
Speech 'say' on mac to mp3 file

Create Aiff file from yout text input

You can do it like this say -f script.txt -o say_output.aiff with text file input or like this say "hello you cheeky scrublords" -o say_output.aiff

Converting to Mp3

Convert using lame like this lame -m m say_output.aiff final_speech.mp3

// Simple bulk only Gateway
// url is for DR (Delivery Reports)
case class Service(name: String, url: String)
// Params your API gets in
case class HttpMessage(service: String, originator: String, msisdn: String, body: String)
// Handles MT's and MO's (maybe should contain service name for sake of simplicity)
case class MQMessage(guid: String, msisdn: String, originator: String, body: String)
// Types of DR's you could send
@JakubOboza
JakubOboza / Toggle Function Keys.scpt
Created July 5, 2011 14:49 — forked from ysamlan/Toggle Function Keys.scpt
Toggle function keys / media keys on OS X 10.6 & show current status with Growl (updated from http://macsteps.com/blog/tips/how-to-quickly-toggle-your-keyboards-function-keys/ which only works on 10.5)
tell application "System Preferences"
set current pane to pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
-- If we don't have UI Elements enabled, then nothing is really going to work.
if UI elements enabled then
tell application process "System Preferences"
get properties
@JakubOboza
JakubOboza / gist:463586d764287971fc6c28a3f85294b3
Created May 17, 2016 12:51
Riak issue with upgrade from old -sname rings to new -name rings.
Dear Team
What are we trying to do:
We are trying to change -sname to -name within our existing cluster without taking the cluster down.
We had a call with basho and we were advised to take steps like here:
http://docs.basho.com/riak/1.4.9/ops/running/nodes/renaming/#Multi-Node-Clusters
They didn't work.
import Prelude
import Control.Exception
main = do
input <- getLine
let parsedNum = (read input::Double)
result <- try (print parsedNum) :: IO (Either IOException ())
case result of
Right () -> putStrLn "Great Success! "
Left e -> do
@JakubOboza
JakubOboza / main.hs
Created December 5, 2013 09:47
lulz on forkIO
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Main (main) where
import Database.Redis
import Control.Concurrent
import Control.Concurrent.Chan
import Data.ByteString.Char8 as B
import Control.Monad.IO.Class
import Control.Monad
require 'redis'
$redis = Redis.new
GLOBAL = "counter_global"
def local
"counter_sec_#{Time.now.to_i}"
end
lets assume you have array or urls yes ?
urls.each do |url|
check_if_counter < 50
if yes
spawn_thread(url)
else
sleep(2)
@JakubOboza
JakubOboza / sayer.js
Last active December 27, 2015 13:49
mac campfire talking process
var exec = require("child_process").execFile;
var Campfire = require("./node_modules/campfire").Campfire;
var instance = new Campfire({
ssl : true,
token : "key",
account : "domain"
});
instance.join("577834", function(error, room) {