Skip to content

Instantly share code, notes, and snippets.

View Simon-L's full-sized avatar
😠
Leaving Github!

FergusL Simon-L

😠
Leaving Github!
  • Not Microsoft
  • Paris, France
View GitHub Profile
@Simon-L
Simon-L / main.c
Created October 5, 2014 19:13
Using Gamazeps's WS2812 driver
#include "ch.h"
#include "hal.h"
#include "leds.h"
#include "hsv2rgb.h"
int main(void) {
halInit();
chSysInit();
@Simon-L
Simon-L / main.c
Last active August 29, 2015 14:13
Deliberately erroneous C-ish snippet with the sole purpose of faking code visually and helping fantastic creative people :)))))
*void _physicalTransfer (&objectID cellphone, &obj destHand, gl_vec3 &vector){};
@Simon-L
Simon-L / Poche.class.php
Last active August 29, 2015 14:14
Adding tagging on save in Wallabag and its Chrome extension the *very* hackish way!
function displayView($view, $id = 0)
...
case 'save':
$tpl_vars = array();
if (isset($_GET['url'])){
$tpl_vars['url'] = $_GET['url'];
}
if (isset($_GET['encoded_url'])){
$tpl_vars['encoded_url'] = $_GET['encoded_url'];
}
print("Haha")
@Simon-L
Simon-L / user_main.c
Last active November 9, 2015 15:54
ESP8266 HSPI
void ICACHE_FLASH_ATTR
spi_mast_2bytes_write(uint8 spi_no,uint16 data)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MOSI|SPI_USR_MISO);
// Range : 170 - 1015
int range = 1015 - 170;
boolean state = false;
void setup() {
Serial.begin(9600);
# For complete documentation of this file, please see Geany’s main documentation
# no syntax highlighting yet
# default extension used when saving files extension=asciidoc
# the following characters are these which a "word" can contains, see documentation #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
# single comments, like # in this file comment_single=// # multiline comments #comment_open=//// #comment_close=////
# Render Test
import bpy
from bpy.props import *
#Setup Radio Button Enum Props
bpy.types.Scene.rtSizeEnum = bpy.props.EnumProperty( \
items = [('Half', 'Half', 'Half the size of the render rez'),\
('Quarter', 'Quarter', 'Quarter the size of the render rez'),\
@Simon-L
Simon-L / gist:5281831
Created March 31, 2013 20:08
FFmbc help, as seen in the output of "ffmbc --help"
usage: ffmbc [options] [[infile options] -i infile]... {[outfile options] outfile}...
Main options:
-L show license
-h show help
-? show help
-help show help
--help show help
-version show version
@Simon-L
Simon-L / gist:5287546
Created April 1, 2013 20:36
FFmpeg help, as seen in the output of "ffmpeg" and "man ffmpeg" (Linux)
ffmpeg version N-37724-ga3c4371 Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 11 2012 00:22:20 with gcc 4.6.1
configuration: --enable-gpl --enable-nonfree --enable-frei0r
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 1.100 / 54. 1.100
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.100 / 2. 62.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100