This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# pip3 install cloudflare requests | |
import requests, time, re, CloudFlare | |
cf = CloudFlare.CloudFlare(email='xxxxx', token='xxxxxxxx') | |
providers = ['http://monip.org', 'http://checkip.dyndns.org/'] | |
sel_zone = "example.tld" | |
sel_record = "dirk.machine.example.tld" | |
delay = 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WILL FAIL with RecursionError: maximum recursion depth exceeded | |
def x(a): | |
y(a - 1) | |
def y(a): | |
if a > 0: | |
x(a) | |
else: | |
print("done") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# DDCLIENT : https://www.cloudflare.com/technical-resources/#ddclient | |
### | |
# /etc/ddclient/ddclient.conf | |
daemon=600 # check every 600 seconds | |
syslog=yes # log update msgs to syslog | |
mail=root # mail all msgs to root | |
mail-failure=root # mail failed update msgs to root | |
pid=/var/run/ddclient.pid # record PID in file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# How to add a UEFI entry | |
# efibootmgr \ | |
# --disk /dev/sda \ | |
# --create \ | |
# --label 'Choisis moi' \ | |
# --loader '\EFI\efistub\vmlinuz' \ | |
# --unicode 'root=UUID=50200856-c21a-4bea-9412-bd2f7b27b8b5 ro rootflags=subvol=root rhgb quiet initrd=\EFI\efistub\initramfs' \ | |
# --verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.video.*; | |
int delay = 3; | |
int square_size = 5; | |
Capture cam; | |
ArrayList<PImage> frames = new ArrayList(); | |
void setup() { | |
size(640, 480); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run with FLASK_APP=server.py flask run | |
# download your file on http://127.0.0.1:5000/random | |
from flask import Flask | |
from flask import Response | |
import os | |
app = Flask(__name__) | |
@app.route('/random') | |
def gen_random(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import requests, sys | |
payload = { | |
'user': sys.argv[1], | |
'pass': sys.argv[2], | |
'msg': sys.stdin.read() | |
} | |
r = requests.get("https://smsapi.free-mobile.fr/sendmsg", params=payload) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mashape.unirest.http.*; | |
/* API Documentation : | |
* https://developer.yahoo.com/weather/#curl | |
* Click on "Current conditions for San Diego, CA" to have a similar requests. | |
* Conditions code can be found here: https://developer.yahoo.com/weather/documentation.html#codes (eg: 0 = tornado) | |
* You must create a folder named "code" in your sketch directory and put unirest.jar inside | |
*/ | |
void setup() { | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float vit=1; | |
int taille =50; | |
PVector[] squares; | |
void setup() { | |
size(600, 600); | |
squares = new PVector[] { | |
new PVector(0,0), | |
new PVector(taille,taille), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
BufferedReader reader; | |
reader = createReader("euler.txt"); | |
ArrayList<Integer> nombres = new ArrayList<Integer>(); | |
while (true) { | |
try { | |
int lu = reader.read(); | |
if (lu == -1) { | |
break; | |
} else { |