Skip to content

Instantly share code, notes, and snippets.

View SalemHarrache's full-sized avatar
💭
🤤

Salem Harrache SalemHarrache

💭
🤤
View GitHub Profile
sun.hac.lp1.d4c.nintendo.net
beach.hac.lp1.eshop.nintendo.net
aauth-lp1.ndas.srv.nintendo.net
accounts.nintendo.com
api.accounts.nintendo.com
app-a04.lp1.npns.srv.nintendo.net
aqua.hac.lp1.d4c.nintendo.net
atum.hac.lp1.d4c.nintendo.net
bcat-data-lp1.cdn.nintendo.net
bcat-list-lp1.cdn.nintendo.net
{
"mappings": {
"cloudflare-log-entry": {
"dynamic_templates": [
{
"fields": {
"mapping": {
"ignore_above": 1024,
"type": "keyword"
},
@SalemHarrache
SalemHarrache / proxy.py
Created April 2, 2017 10:10 — forked from bxt/proxy.py
A very basic caching python HTTP proxy server.
# Originally from http://sharebear.co.uk/blog/2009/09/17/very-simple-python-caching-proxy/
#
# Usage:
# A call to http://localhost:80000/example.com/foo.html will cache the file
# at http://example.com/foo.html on disc and not redownload it again.
# To clear the cache simply do a `rm *.cached`. To stop the server simply
# send SIGINT (Ctrl-C). It does not handle any headers or post data.
import BaseHTTPServer
import hashlib
@SalemHarrache
SalemHarrache / pyenv_install_python.sh
Created March 31, 2017 15:45
Multiple python install with pyenv
#!/usr/bin/env bash
set -e
_print() { printf "\e[1m%s\e[0m\n" "$*"; }
# ensure that Pyenv is installed
export PYENV_ROOT="${HOME}/.pyenv"
if [[ ! -d ${PYENV_ROOT} ]]; then
_print "Installing Pyenv..."
@SalemHarrache
SalemHarrache / Sublime Text 3 Build 3103 License Key - CRACK
Created April 25, 2016 07:12
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@SalemHarrache
SalemHarrache / .pythonrc.py
Last active August 29, 2015 14:23
Python startup script that adds niceties to the interactive interpreter
# -*- coding: utf-8 -*-
"""Startup script that adds niceties to the interactive interpreter.
This script adds the following things:
- Readline bindings, tab completion, and history (in ~/.pyhistory,
which can be disabled by setting NOHIST in the environment)
- Pretty printing of expression output (with Pygments highlighting)
@SalemHarrache
SalemHarrache / pacman.arm-month.conf
Created March 29, 2015 17:52
Pacman install from Archlinux Rollback Machine
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
@SalemHarrache
SalemHarrache / btrfs-snapshot.py
Created February 13, 2015 18:37
Create snapshots with btrfs (original script https://github.com/lordsutch/btrfs-backup)
#!/usr/bin/env python
# Backup a btrfs volume to another, incrementally
# Requires Python >= 3.3, btrfs-progs >= 3.12 most likely.
# Copyright (c) 2014 Chris Lawrence <[email protected]>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
@SalemHarrache
SalemHarrache / remove_foreign_keys.py
Created January 22, 2015 14:44
SQLAlchemy : remove all foreign keys constraints
def remove_foreign_keys(db):
log("Dropping all foreign key constraints from archive database")
inspector = reflection.Inspector.from_engine(db.engine)
fake_metadata = MetaData()
fake_tables = []
all_fks = []
for table_name in db.metadata.tables:
@SalemHarrache
SalemHarrache / mysql5.5_initd.sh
Created January 22, 2015 08:17
mysql5.5 debian 7 init.d
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network $time
# Should-Stop: $network $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6