Skip to content

Instantly share code, notes, and snippets.

@steventroughtonsmith
steventroughtonsmith / gist:62f0b14d5ef532a4be2e2529187c100d
Created November 18, 2016 17:28
iOS Simulator fullscreen enabler
call ((NSWindow *)[(NSArray *)[[NSApplication sharedApplication] windows] lastObject]).collectionBehavior = 1<<7|1<<8|1<<11
//
// UILabel+JumpingDots.swift
// JumpingDots
//
// Copyright (c) 2016 Arkadiusz Holko. All rights reserved.
//
import UIKit
import ObjectiveC
@venj
venj / remux.rb
Created May 20, 2012 06:56
The real deal remux script that can remux videos with M4V compatible video stream. Audio stream will be encoded to 192kbps aac if it is not m4v compatible audio.
#!/usr/bin/env ruby
# Remux MP4/H264 videos (mkv, avi, etc.) to m4v.
TMPFILE = "/tmp/ffprobe_out.txt"
VIDEO_CONTAINER = ["mkv", "f4v", "avi", "divx", "ts"]
VCODECS = ["mpeg4", "h264"]
ACODECS = ["aac"]
if (`which ffmpeg` == "")
puts "You need ffmpeg to use this command."
@venj
venj / torrent_spider.rb
Last active September 30, 2015 12:27
!!!!!DEPRECATED!!!!! Tracking the changes to the website is FUCKING BORING!!!! Torrent spider. Hard to maintain...Damn it, always changes web page...
#!/usr/bin/env ruby
# Download torrents from SOME WEBSITE.
require "rubygems"
require "open-uri"
require "hpricot"
require "uri"
require "colorize"
require 'uri'
require 'net/http'
@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active December 23, 2020 13:57
rbenv install ruby 1.9.3-p448 on Ubuntu 12.04 LTS
#
# Run as root
# $ bash <(curl -s https://raw.github.com/gist/1631411)
#
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl \
libssl-dev \
//
// NSData+hex.h
// NSData+hex
//
// Created by Alex Nichol on 3/29/11.
// Copyright 2011 Jitsik. All rights reserved.
//
#import <Foundation/Foundation.h>