Skip to content

Instantly share code, notes, and snippets.

View lp1dev's full-sized avatar

Jérémie lp1dev

View GitHub Profile
@lp1dev
lp1dev / asm_c_cpp
Created January 17, 2015 18:27
Does C and CPP compilator concatenate all similars 'if' in one ?
//C code
int main(){
int i = 0;
if (i == 1)
write(1, '1', 1);
if (i == 2)
write(1, '1', 1);
if (i == 3)
write(1, '1', 1);
@lp1dev
lp1dev / gist:fc966749f85868a9474f
Created June 1, 2015 15:28
Python Facebook connecting
#!/usr/bin/python3
import requests
import json
api_url = "https://m.facebook.com/login.php"
def login(email, passw):
data = {
'lsd': lsd,
@lp1dev
lp1dev / codetest1.js
Created September 27, 2017 14:28
Code test
let array = [ //Test Array
{
"name": "Test1",
"ranking": 42
},
{
"name": "Test2",
"ranking": 41
},
{
var promise = new Promise((resolve, reject) => {
setTimeout(() => resolve('first promise'), 1000);
})
var secondPromise = new Promise((resolve, reject) => {
setTimeout(() => resolve('second promise'), 500);
})
var thirdPromise = new Promise((resolve, reject) => {
setTimeout(() => resolve('third promise'), 250);
driver=nl80211
auth_algs=1
wpa_key_mgmt=WPA-PSK
ssid=DebugWiFi
channel=1
hw_mode=g
wpa_passphrase=ThisIsObviouslyAPlaceholder
interface=YOUR_INTERFACE_NAME
wpa=1
wpa_pairwise=TKIP
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
### Keybase proof
I hereby claim:
* I am lp1dev on github.
* I am lp1 (https://keybase.io/lp1) on keybase.
* I have a public key ASBtgPjCGX97xm-1lE9C-jZ5vRArO7xgmZjA84SOyMRlAQo
To claim this, I am signing this object:
@lp1dev
lp1dev / clone.py
Created March 23, 2019 14:36
NFC automatic clone script w/ 16x2 LCD
#!/usr/bin/python
import time
import subprocess
import Adafruit_CharLCD as LCD
import gpiozero
# Raspberry Pi pin configuration:
lcd_rs = 26
lcd_en = 19
lcd_d4 = 13
#!/bin/sh
APK=$1
echo "Extracting "$APK
echo "N" | unzip $APK -d "$APK""_extract"
cd "$APK""_extract"
FIREBASE_URL=`grep -oE 'https:\/\/[a-zA-Z0-9\-]+\.firebaseio.com' -a ./resources.arsc`
RESPONSE=`curl "$FIREBASE_URL/.json" 2>/dev/null`
if echo $RESPONSE | grep "Permission denied";then
echo "$FIREBASE_URL: KO"
@lp1dev
lp1dev / send-magic-packet.sh
Last active June 23, 2021 19:42 — forked from SteveMarshall/send-magic-packet.sh
Wake-On-Lan Magic Packet using netcat in bash
#!/usr/bin/env ash
mac_address=$1
# Strip colons from the MAC address
mac_address=$(echo $mac_address | sed 's/://g')
broadcast=$2
port=4343
# Magic packets consist of 12*`f` followed by 16 repetitions of the MAC address