Skip to content

Instantly share code, notes, and snippets.

@show0k
show0k / monitor.bash
Created June 2, 2015 14:59
live usb dubugging
tail -f /var/log/kern.log
@show0k
show0k / find_words.py
Created April 23, 2015 09:54
Bruteforce word with a specified separator
def find_words(instring, words, prefix=''):
""" Quick and dirty snippet to split string without space
to a list of known words.
Used to pass over a bug of Snap!"""
if not instring:
return []
if (not prefix) and (instring in words):
return [instring]
prefix, suffix = prefix + instring[0], instring[1:]
@show0k
show0k / lbca.py
Last active January 7, 2024 23:19 — forked from fclairamb/lbca.py
Parseur de leboncoin : permet de s'envoyer des emails lors de nouvelles annonces sur une recherche précise
#!/usr/bin/python
import urllib
import requests
import re
import sqlite3
import os
import argparse
import gettext
import logging
import logging.handlers
/*
* Arduino library for the MMA8452Q three-axis accelerometer.
*
* The MMA8452Q is a tiny and low-power three-axis accelerometer. This
* library implements a simple interface to access most of the chip
* functionality from an Arduino.
*
* FEATURES:
* + Normal and fast raw axes values reading
* + Scale configuration (allowed 2g, 4g and 8g scales)
@show0k
show0k / morse.ino
Created May 21, 2014 23:16 — forked from madc/LICENSE
//Define the LED Pin
#define PIN_OUT 9
//Define unit length in ms
#define UNIT_LENGTH 250
//Build a struct with the morse code mapping
static const struct {const char letter, *code;} MorseMap[] =
{
{ 'A', ".-" },
{ 'B', "-..." },
@show0k
show0k / batch_clean_web_image
Last active August 29, 2015 14:01
Convertir en pgm, redimenssioner et rennomer un lot d'images venant du web (téléchargés sur google image avec l'extension de firefox DownloadThemAll) pour l'exploiter dans un algo de traitement d'image
#!/bin/bash
#
# Usage : bash script.sh directory_of_my_pictures
#
dir=$1
# Need to make a function to allow "cd"