Skip to content

Instantly share code, notes, and snippets.

View xseignard's full-sized avatar
🦄
Internet thuggin'

Xavier Seignard xseignard

🦄
Internet thuggin'
View GitHub Profile
#!/bin/bash
# create adhoc network function
createAdHocNetwork(){
echo "Creating ad-hoc network"
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid AccessPoint
ifconfig wlan0 11.0.0.1 netmask 255.255.255.0 up
echo "Ad-hoc network created"
void glow() {
float r, g, b;
for(int k = 0; k < 1024; k=k+1) {
r = (k/1024.0) * blue[0];
g = (k/1024.0) * blue[1];
b = (k/1024.0) * blue[2];
for(int i = 0; i < NUM_LEDS; i++ ) {
leds[i].r = r;
leds[i].g = g;
leds[i].b = b;
#include "Pad.h"
Pad::Pad(int sensorPin, int ledPin, String direction) :
_sensorPin(sensorPin), _ledPin(ledPin), _direction(direction), _previous(false) {
_leds = new CRGB[NUM_LEDS];
FastLED.addLeds<NEOPIXEL, _ledPin>(_leds, NUM_LEDS);
pinMode(_sensorPin, INPUT);
}
avprobe version 11.2-6:11.2-1, Copyright (c) 2007-2014 the Libav developers
built on Jan 18 2015 05:12:33 with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'load.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2016-02-24 18:45:08
Duration: 00:00:04.20, start: 0.000000, bitrate: 12625 kb/s
Stream #0.0(eng): Video: h264 (Main), yuv420p, 1920x1080, 12334 kb/s, 30 fps, 30k tbn, 60 tbc (default)
import path from 'path';
import webpack from 'webpack';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import autoprefixer from 'autoprefixer';
let pathToReact = path.resolve('node_modules', 'react/dist/react.min.js');
let pathToReactDom = path.resolve('node_modules', 'react-dom/dist/react-dom.min.js');
module.exports = {
eslint: {
@xseignard
xseignard / esnextbin.md
Created February 9, 2016 13:08
esnextbin sketch
import fs from 'fs';
import path from 'path';
import { execSync } from 'child_process';
import mkdirp from 'mkdirp';
import rimraf from 'rimraf';
import _ from 'lodash';
import manifest from '../package.json';
const arch = 64;
const target = 'deb';
set normal_hostname "Overkill CTS"
hostname "$normal_hostname"
sv_motd "Pouet"
sv_public 1
port 26000
// number of players
maxplayers 20
g_maxplayers 20
#include <SX1272.h>
#include <SPI.h>
#include <Somo2.h>
#include <Wire.h>
#include <PN532_I2C.h>
#include <PN532.h>
#include <NfcAdapter.h>
#include <Adafruit_CAP1188.h>
#include <elapsedMillis.h>
#include <SoftwareSerial.h>
int Rx_pin = 9; // to Somo Tx
int Tx_pin = 8; // to Somo Rx
SoftwareSerial Somo(Rx_pin,Tx_pin);
// Init Somo byte stream
byte init[] = {0x7E, 0x06, 0x00, 0x00, 0x1E, 0xFF, 0xDC, 0xEF};
// Example byte stream to send to play track 001