Skip to content

Instantly share code, notes, and snippets.

View gregorg's full-sized avatar

Greg gregorg

  • Annecy, France
View GitHub Profile
@gregorg
gregorg / gist:0b3c3108f3f4bb7863e44f555bb6f366
Created November 3, 2017 20:11
Configuration minimale iNav pour aile volante
# mixer
mixer FLYING_WING
# feature
feature MOTOR_STOP
feature AIRMODE
feature PWM_OUTPUT_ENABLE
# aux
aux 0 0 0 1800 2100
@gregorg
gregorg / kiss_dfu_upload.sh
Created March 14, 2016 10:36
Upload KISS Firmware via dfu-util
#!/bin/bash
[ -z "$1" ] && { echo "Usage: $0 firmware.dfu"; exit 1; }
set -e
echo "==== UNLOCK EEPROM ===="
dfu-util --alt 0 -s 0x08000000:force:unprotect -D "$1"
@gregorg
gregorg / psqlrc
Created February 24, 2016 15:22
psqlrc
-----------------------------------------
-- psqlrc file to set psql preferences --
-----------------------------------------
\set QUIET ON
\set PROMPT1 '%[%033[1m%]%n@%/%[%033[0m%]% # '
\set PAGER OFF
-- \set HISTFILE ~/.psql_history- :HOST - : DBNAME -- Remove space between : and DBNAME
-- \set HISTFILE ~/.psql_history-:DBNAME
# Clone
LABEL live_clone_i386
MENU LABEL C^loner i386
kernel debian-live/i386/vmlinuz-2.6.25-2-686
append vga=788 initrd=debian-live/i386/initrd.img-2.6.25-2-686-bnx2 boot=live union=aufs noswap noprompt fetch=http://100.12.254.1:81/pxe/debian-live-lenny-i686.squashfs keyb=fr noxautoconfig ezhook=http://10.0.254.1:84/pxe/hook.clone --
#### Contents of the preconfiguration file (for &releasename;)
### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US.UTF-8
# Keyboard selection.
#d-i console-tools/archs select at
d-i console-keymaps-at/keymap select fr-latin9
# Example for a different keyboard architecture
#d-i console-keymaps-usb/keymap select mac-usb-us
@gregorg
gregorg / KISS_OSD.ino
Created February 7, 2016 13:03
KISS OSD with nickname
/*
KISS FC OSD v1.0
By Felix Niessen (felix.niessen@googlemail.com)
for Flyduino.net
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
### Keybase proof
I hereby claim:
* I am gregorg on github.
* I am skygreg (https://keybase.io/skygreg) on keybase.
* I have a public key whose fingerprint is A034 9E58 31CF 0DFD 9829 1279 801E 2C8B DEF7 4898
To claim this, I am signing this object:
- name: SUDO | check version
stat: path=/etc/sudoers.d
register: sudoversion
tags: sudo
- name: SUDO | config
copy: src=sudoers dest=/etc/sudoers
tags: sudo
- name: SUDO | fix perms
@gregorg
gregorg / owncloud.yml
Created January 31, 2015 16:59
ownCloud role
- name: ownCloud APT key
apt_key: url=http://download.opensuse.org/repositories/isv:ownCloud:community:nightly/Debian_7.0/Release.key state=present
- name: ownCloud APT repository
apt_repository: repo="{{ item }}" state=present update_cache=yes
with_items:
- "deb http://download.opensuse.org/repositories/isv:/ownCloud:/community:/nightly/Debian_7.0/ /"
- name: Install ownCloud package
apt: pkg={{ item }} state=latest
#!/bin/sh
cat <<EOF >/tmp/GHOST.c
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"