Skip to content

Instantly share code, notes, and snippets.

View danielandersson's full-sized avatar
👨‍🎨
Being creative!

Daniel Andersson danielandersson

👨‍🎨
Being creative!
View GitHub Profile
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 26, 2024 11:01
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
Following the news about Facebook buying Instagram I decided to delete my Instagram account before Facebook claims ownership of my pictures.
Since the Instagram-recommended (in their FAQ): http://instaport.me/export doesn't work for me (probably they can't cope with the high demand),
here is a quick and dirty way to download all my Instagram pictures in their highest resolution in a few easy steps.
You will need: Firefox, Firebug, some text editor, wget
1. Go to http://statigr.am/yourlogin using Firefox with Firebug extension active
2. Scroll down as many times as it is needed to have all yor pictures thumbnails displayed (I had some 3 hundred pictures so it was not that much scrolling, YMMV)
3. In the Firebug JS console run this JS code: $(".lienPhotoGrid a img").each(function(index) { console.log($(this).attr('src')) })
4. JS console will contain urls to all the thumbnails images, like this: http://distilleryimage1.s3.amazonaws.com/4ed46cf2801511e1b9f1123138140926_5.jpg
@christianchristensen
christianchristensen / twitterfindname.go
Last active May 30, 2016 11:36
Check all 2 letter twitter usernames for availability
package twitterfindname
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
)
Pet (for Mage, Hunter, and Warlock):
dmKTcaGivLgfr5uivZcj0TqL2fsPHjshtPSmG6zc10GY1a02aY3ayCkvNdLSoKGdIuSqKOhQkIjQkQUisQnkO(OQqgjrvojrvTsuXlvLuZuvuUPQa7ef(PQQgksYsvv4PunvqDvvfTvvr6RQs5TQsYDvLO9k9xbzWqoSqwSQeEmrMmuDzfBgv9zrmAu0PvYRvfQzlWTbz3i(nLgUQklNWZf10jDDk2orLVRkvJxvqNhLA)QC3kCDO641XlCDdrfRKKru46sMSAHQZBis6YsKr)qIrncYHuHzo0qWRwxmjllbM9VPoKfFcQ)W)885rB4DWXXBy7yXaWybCpDV8CXWQZ(ppFE0gMlaaaacalDheywGbdai4YZfdy9fEDQgToKfFccXUH5celflEBheR4DGBBXGkpxGy1FFHRmldqX71fwnsxwszaooToXablwjjJixgB1zoReMAddcilaPG2bXcmRnSnaGkpxS46QyLKmIcxxz)BQlzYQfQUKjRwONBer6YsQZBis6YsKr)4COdDOd92e9yAmIOmTIjzzj5x9LQr)(sAftYYsOfYIpbuWh9tYsL993OFPFOJZHo0HoKyuJGCOukMECgcEDjtwTqHyUWN6sMSAHQlzYQfQoVHiPllrg9JZHo0Ho0I)qYoevbrShbCuWq0WIiOHcYp7mTVtKr)q0pKYCihsmQrqoKkmZX5qh6qhAi4hNHGxFKBiAUo1pLrO)1Lmz1cfsz)BQpYneTA9aBeEHRBYtiPGOCUVOUWgmfUoKjqxfUA16sbr5CHRdzc0vHR)aAEe1LY6VrZhp7)tEDPSU8(Kbm1FukRwTA1656I4uW1LRm2WstR2c
Player:
dSdOcaGEPQ0UauBtQ4NOcZMqpJu9yk6UsLQBd0HjPDsk2RYUrz)QmkuLHjPFt0PLYqrfnyKgoGCqPk6ue4yQQZHk9Cq(lP0xjr1YrSivrpv0YuLwNQqtuQsMkLmziMU
@Farfarer
Farfarer / CubemapToEquirectangularWizard.cs
Last active March 6, 2023 05:45
Create dynamic equirectangular maps for Unity. These have the benefit that, as they're flat images, you can sample lower mips to get blurry reflections. The straight cubemap version (detailed here: http://www.farfarer.com/blog/2011/07/25/dynamic-ambient-lighting-in-unity/ ) will give you hard seams when you sample mips from the cubemap. Although…
// Wizard to convert a cubemap to an equirectangular cubemap.
// Put this into an /Editor folder
// Run it from Tools > Cubemap to Equirectangular Map
using UnityEditor;
using UnityEngine;
using System.IO;
class CubemapToEquirectangularWizard : ScriptableWizard {
@aras-p
aras-p / preprocessor_fun.h
Last active May 28, 2024 05:15
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@rubinovitz
rubinovitz / instagram_mine.py
Created August 27, 2013 00:00
A python script for downloading all of the instagram photos of a certain hashtag I wrote for a friend in 20 minutes (forgive sloppiness). Warning: you're only allowed 30 API requests an hour. Requires your own access token set as environment variable "access_token".
from datetime import datetime
import urllib2
import urllib
import json
import os
def ajaxRequest(url=None):
"""
Makes an ajax get request.
url - endpoint(string)
@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 28, 2024 07:00
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k