Skip to content

Instantly share code, notes, and snippets.

View awojnowski's full-sized avatar

Aaron Wojnowski awojnowski

  • Winnipeg, MB, Canada
View GitHub Profile
@awojnowski
awojnowski / generate_slideshow_command.py
Created May 12, 2023 14:02
Generate slideshow from photos using FFMPEG
import natsort
import os
from PIL import Image
import sys
INPUT_DIR = "/Users/aaron/Desktop/pictures"
OUTPUT_DIR = "/Users/aaron/Desktop/pictures-processed"
OUTPUT_WIDTH = 1920
OUTPUT_HEIGHT = 1080
//
// main.c
// guavajuice
//
// Created by Aaron Wojnowski on 2014-10-24.
// Copyright (c) 2014 aaron. All rights reserved.
//
#include <stdio.h>
#include <string.h>
//
// main.c
// guavajuice
//
// Created by Aaron Wojnowski on 2014-10-24.
// Copyright (c) 2014 aaron. All rights reserved.
//
#include <stdio.h>
#include <string.h>
@awojnowski
awojnowski / gist:5311690
Created April 4, 2013 16:02
YouTube "s" Sig
<!DOCTYPE html><html lang="en" data-cast-api-enabled="true"><head> <link id="css-3797231512" rel="stylesheet" href="http://s.ytimg.com/yts/cssbin/www-core-vflDAc18Y.css">
<script>var ytcsi = {data_: {tick: {},info: {}},tick: function(l, t) {ytcsi.data_.tick[l] = t || new Date();},info: function(k, v) {ytcsi.data_.info[k] = v;}};ytcsi.tick('start');if (document.webkitVisibilityState == 'prerender') {ytcsi.info('prerender', 1);document.addEventListener('webkitvisibilitychange', function() {ytcsi.tick('start');}, false);}try {ytcsi.pt_ = (window.chrome && chrome.csi().pageT ||window.gtbExternal && gtbExternal.pageT() ||window.external && external.pageT);if (ytcsi.pt_) {ytcsi.info('pt', Math.floor(ytcsi.pt_));}} catch(e) {}</script>
<script>var ytdns = {};ytdns.ping = function(src, num) {var img = new Image();ytdns[num] = img;img.onload = img.onerror = function() {delete ytdns[num];};img.src = src;};ytdns.ping("http:\/\/r3---sn-vgqelne6.c.youtube.com\/crossdomain.xml", 2);ytdns.ping("http:\/\/r3---sn-v
@awojnowski
awojnowski / gist:4445875
Last active December 10, 2015 14:09
YouTube MP4 Grabber 2.0
-(NSString *)mp4URLFromYoutubeContents:(NSString *)string error:(NSError **)error {
@try {
NSString * (^getGETVariable)(NSString *url, NSString *val) = ^(NSString *url, NSString *val){
NSArray *array = [url componentsSeparatedByString:[NSString stringWithFormat:@"%@=",val]];
if ([array count] <= 1) return (NSString *)nil;
val = [array[1] componentsSeparatedByString:@"&"][0];
@awojnowski
awojnowski / oauth.py
Created July 4, 2012 02:37
Python Twitter OAuth
import random;
import string
import time
import urllib
import urllib2
from urlparse import urlparse
import hmac
import hashlib
@awojnowski
awojnowski / gist:2225816
Created March 28, 2012 12:33
Facebook Bootstrap Automater
<?php
function retrieve_graph($input) {
$json = file_get_contents('http://graph.facebook.com/' . $input);
$json = json_decode($json);
if (isset($json->error) || !$json) return null;
return $json;
@awojnowski
awojnowski / gist:2069100
Created March 18, 2012 05:17
YouTube URL .MP4 Grabber
-(void)viewDidLoad {
[super viewDidLoad];
[[self view] setBackgroundColor:[UIColor whiteColor]];
NSString *url = @"http://www.youtube.com/watch?v=8UVNT4wvIGY";
[NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]] queue:[[[NSOperationQueue alloc] init] autorelease] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
@awojnowski
awojnowski / letter_rearranger.class.php
Created January 5, 2012 18:06
Rearranges and uses the letters of a word to form all possible other words, in PHP.
<?php
/*
letter_rearranger.class.php
Created by Aaron Wojnowski, 2012
-- USAGE --
1) Create a .txt wordlist with words separated with a newline. Example: