Skip to content

Instantly share code, notes, and snippets.

@dattaz
dattaz / Makefile
Created May 26, 2017 21:50
int overflow with file in emscripten
all:
emcc test.c -o test.js --pre-js prejs.js --post-js postjs.js -s WASM=1
import json
import requests
import datetime
account = "NSAGov"
keyword = "mathtitude"
bridge_instance = "https://bridge.suumitsu.eu/"
#Get tweet in json from RSS bridges
url = bridge_instance + "?action=display&bridge=Twitter&u=" + account + "&format=Json"
json_content = requests.get(url=url)
tweets = json_content.json()
@dattaz
dattaz / count_nb_file_in_dir.c
Created February 19, 2017 09:41
Count number of file in your current path
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
int main (void){
DIR *dp;
dp = opendir ("./");
int i=0;
if (dp != NULL){
-- Génération automatique de classements aléatoires en production, pour les FNS
-- ============================================================================
FUNCTION gen_class_alea_V1_relatif_grp(
o_etablissement_accueil_ins IN VARCHAR2,
o_code_confidentiel_inscription IN NUMBER,
o_c_gp_cod IN NUMBER,
o_g_tg_cod IN NUMBER,
login IN VARCHAR2,
me@host:/tmp$ cat temp.c
#include <stdlib.h>
#include <stdio.h>
int main(){
char temp[512] = "06:04,1";
printf("%c %c %c %c\n",temp[0],temp[1],temp[3],temp[4]);
printf("%d %d %d %d\n\n",atoi(&temp[0]),atoi(&temp[1]),atoi(&temp[3]),atoi(&temp[4]));
return EXIT_SUCCESS;
}
AddonManager.getAddonByID("adbhelper@mozilla.org", (addon) => {
console.debug("ADBHelper:", addon);
console.debug("ADBHelper version:", addon.version);
if (addon.version !== "0.8.6" && addon.version !== "0.8.7") {
console.error("ADB Helper addon has wrong version 1");
}
});
[youtube] fiore9Z5iUg: Downloading webpage
[youtube] fiore9Z5iUg: Downloading video info webpage
ERROR: YouTube said: This video is available in France, French Guiana, Guadeloupe, Martinique, New Caledonia, French Polynesia, Saint Pierre and Miquelon, Réunion, Wallis and Futuna, Mayotte only
error : <class 'youtube_dl.utils.DownloadError'>
We will re-try to get this video in 10s
[youtube] fiore9Z5iUg: Downloading webpage
[youtube] fiore9Z5iUg: Downloading video info webpage
ERROR: YouTube said: This video is available in France, French Guiana, Guadeloupe, Martinique, New Caledonia, French Polynesia, Saint Pierre and Miquelon, Réunion, Wallis and Futuna, Mayotte only
error : <class 'youtube_dl.utils.DownloadError'>
We will re-try to get this video in 10s
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import youtube_dl
import time
import sys
url = "https://www.youtube.com/watch?v=fiore9Z5iUg"
with youtube_dl.YoutubeDL({'outtmpl': 'video.mp4'}) as ydl:
attempts = 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import youtube_dl
import time
import sys
url = "https://www.youtube.com/watch?v=fiore9Z5iUg"
with youtube_dl.YoutubeDL({'outtmpl': 'video.mp4'}) as ydl:
attempts = 0
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- ZTE open c (kis 3) -->
<remote fetch="git://github.com/CyanogenMod" name="cyanogen"/>
<remote fetch="git://github.com/KonstaT/" name="KonstaT"/>
<project path="device/zte/kis3" name="android_device_zte_kis3" remote="KonstaT" revision="cm-12.1" />
<project path="kernel/zte/msm8610" name="android_kernel_zte_msm8610" remote="KonstaT" revision="cm-12.1" />
<project path="vendor/zte" name="proprietary_vendor_zte" remote="KonstaT" revision="cm-12.1" />