Skip to content

Instantly share code, notes, and snippets.

View AnasQiblawi's full-sized avatar
🍋
On vacation

Anas Qiblawi AnasQiblawi

🍋
On vacation
View GitHub Profile
@013
013 / scrape.py
Created April 13, 2013 19:46
Generate magnet links and a couple other things
#!/usr/bin/python
import re, sys, bencode, binascii, urllib, hashlib
tracker = "http://swiftler.com:6969/scrape?info_hash="
def usage():
print """
Usage: ./scrape [OPTION] [FILE/HASH]
-h Use a hash to get seeders, leechers and completed downloads
This file has been truncated, but you can view the full file.
[
{
"1": "https://twist.moe/anime/07ghost/07ghost-0001.mp4",
"2": "https://twist.moe/anime/07ghost/07ghost-0002.mp4",
"3": "https://twist.moe/anime/07ghost/07ghost-0003.mp4",
"4": "https://twist.moe/anime/07ghost/07ghost-0004.mp4",
"5": "https://twist.moe/anime/07ghost/07ghost-0005.mp4",
"6": "https://twist.moe/anime/07ghost/07ghost-0006.mp4",
"7": "https://twist.moe/anime/07ghost/07ghost-0007.mp4",
"8": "https://twist.moe/anime/07ghost/07ghost-0008.mp4",
@naaman
naaman / delete-heroku-apps.sh
Last active March 5, 2021 20:57
[WARNING THIS WILL HARD DELETE YOUR APPS. YOU COULD LOSE DATA. MAKE SURE YOU KNOW WHAT YOURE DOING!!!!!!!!!!] Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done
@notslang
notslang / twitter-verified-icon.svg
Last active March 22, 2023 14:01
The blue verified icon, extracted from Twitter's icon font & resized using Inkscape
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcsrb
jcsrb / gist:1081548
Created July 13, 2011 23:05
get avatar from google profiles, facebook, gravatar, twitter, tumblr
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version
@xissy
xissy / getYoutubeVideoInfo.coffee
Last active November 29, 2023 18:09
Get a youtube video information from get_video_info.
request = require 'request'
youTubeMovieInfo =
youTubeMovieId: 'videoId'
url = "http://www.youtube.com/get_video_info?video_id=#{youTubeMovieInfo.youTubeMovieId}"
request.get url, (err, res, body) ->
return callback(false) if err
return callback(false) if res.statusCode isnt 200
@smebberson
smebberson / .gitignore
Created January 9, 2012 06:46
Express simple authentication example
node_modules
*.swp
@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active April 23, 2024 17:49
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@consti
consti / hosts
Last active April 23, 2024 19:50
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@hlorand
hlorand / vidstab_ffmpeg.md
Last active April 25, 2024 15:26
Video stabilization using VidStab and FFMPEG

Video stabilization using VidStab and FFMPEG

** Step 1 **

Install ffmpeg with the vidstab plugin.