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:8452941
Created January 16, 2014 10:47
Find Perl dependencies for Debian packages. find_perldeps.pl -d script.pl
#!/usr/bin/perl -w
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
$VERSION = '0.06';
use strict;
use Config;
use Getopt::Std;
#!/bin/bash
# global variable of config of backup DB
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
charset="--default-character-set=utf8"
mysql="mysql -A $charset"
mysqldump="mysqldump --opt $charset"
mysqlcheck="mysqlcheck"
verbose=0
optimize=0
install_conf() {
src="$envdir/$1"
dst=$2
# METHODE AVEC "install"
mode=600
if [ -h $dst ]
then
rm -vf $dst
fi
┐┌┐┌┐
┘└┘└┘ ╲ο̷ފ
┐┌┐┌┐ / Friday
┘└┘└┘ノ)
┐┌┐┌┐ deploy,
┘└┘└┘
┐┌┐┌┐ good
┘└┘└┘
┐┌┐┌┐ luck!
│││││
@gregorg
gregorg / GHOST.c
Created January 28, 2015 14:52
GHOST poc
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
#!/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"
@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
- 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
### 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:
@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.