Skip to content

Instantly share code, notes, and snippets.

@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active September 9, 2025 12:59
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@jessfraz
jessfraz / boxstarter.ps1
Last active October 12, 2025 03:18
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
anonymous
anonymous / gist:9847044
Created March 29, 2014 02:06
!
function (global, factory) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = global.document ? factory(global, !0) : function (w) {
if (!w.document) throw new Error("jQuery requires a window with a document");
return factory(w)
} : factory(global)
}("undefined" != typeof window ? window : this, function (window, noGlobal) {
function isArraylike(obj) {
var length = obj.length,
type = jQuery.type(obj);
@DavidBruant
DavidBruant / gist:9549803
Last active December 13, 2017 13:40
Réponse à Un gros Troll de plus sur Javascript sametmax.com/un-gros-troll-de-plus-sur-javacscript/

C’est quand Google a enfin pu donner des perfs décentes – c’est à dire celles qu’ont d’autres langage depuis une décennie – à Javascript que les gens ont envisagé de l’utiliser sur le serveur.

Nan, c'est parce que Ryan Dahl a compris l'importance de la programmation asynchrone et que les gens qui font du JS sont déjà dans le moule de l'asynchrone et que c'était donc une communauté facile à convaincre. C'est juste une bonne coïncidence qu'au moins une VM très performante est dispo.

Node.js massacre beaucoup d'autres langages en performance grâce à l'asynchrone, pas grand chose d'autre, sûrement pas la "vitesse du langage".

Javascript (...) ne sert absolument à rien sans un framework côté serveur

On compare des choux et des carottes. Un langage (syntaxe, sémantique) ne sert à rien. Il faut toujours des trucs en plus. Dans un contexte web, à quoi sert Ruby sans Rails ?

@jmatthias
jmatthias / uuid_column.py
Created February 27, 2014 23:48
Database-agnostic SQLAlchemy UUID column type
import psycopg2.extras
import sqlalchemy.dialects.postgresql
from sqlalchemy.types import TypeEngine
from sqlalchemy.types import String
from sqlalchemy.types import TypeDecorator
import uuid
# Required for PostgreSQL to accept UUID type.
psycopg2.extras.register_uuid()
@hubert3
hubert3 / samsung_hash_crack.py
Last active October 8, 2025 15:05
Python implementation of passcode hashing algorithm used on the Samsung Galaxy S4 GT-I9505 4.2.2
#!/usr/bin/python
'''
Python implementation of passcode hashing algorithm used on the Samsung Galaxy S4 GT-I9505 4.2.2
Correct PIN for hash and salt below is 1234.
Get 40-character hash value in ascii hex format from file /data/system/password.key on the phone
Get salt in signed numeric format by doing sqlite3 query SELECT value FROM locksettings WHERE name = 'lockscreen.password_salt' on /data/system/locksettings.db
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active October 26, 2025 08:45
A badass list of frontend development resources I collected over time.
@markhuge
markhuge / bottle-jsonp.py
Created March 2, 2013 21:56
Dynamically Serving JSONP with bottle.py
# This will return either JSON or JSONP depending on the existence of a callback.
def jsonp(request, dictionary):
if (request.query.callback):
return "%s(%s)" % (request.query.callback, dictionary)
return dictionary
@route('/something')
def something():
return jsonp(dict(success="It worked"))
@ndarville
ndarville / business-models.md
Last active October 9, 2025 17:55
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google