Skip to content

Instantly share code, notes, and snippets.

View squirelo's full-sized avatar
💭
Currently entertaining

Valentin Squirelo squirelo

💭
Currently entertaining
View GitHub Profile
@squirelo
squirelo / rocketlauncher.ino
Created May 6, 2016 11:39
rocket launcher
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
const char* ssid = "bla";
const char* password = "blablabla";
ESP8266WebServer server(80);
@squirelo
squirelo / plantoid shopping list.md
Last active May 7, 2016 12:19
plantoid shopping list
@squirelo
squirelo / bluetoothbalanceboard.ino
Created July 7, 2016 18:33
bluetooth balance board
// Full orientation sensing using NXP's advanced sensor fusion algorithm.
//
// You *must* perform a magnetic calibration before this code will work.
//
// To view this data, use the Arduino Serial Monitor to watch the
// scrolling angles, or run the OrientationVisualiser example in Processing.
#include <NXPMotionSense.h>
#include <Wire.h>
#include <EEPROM.h>
/*
* Press a button and send a post request
*
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
ESP8266WiFiMulti WiFiMulti;
@squirelo
squirelo / noble test.js
Created August 29, 2016 11:53
noble test
// https://forums.meteor.com/t/meteor-and-the-internet-of-things-iot-whats-best-to-use-collection-meteor-streams-streamy/792/57
// https://github.com/wojtkowiak/meteor-custom-protocol
// Other options
// http://stackoverflow.com/questions/23148992/how-to-emit-data-only-to-one-client-in-meteor-streams
// http://stackoverflow.com/questions/26226583/meteor-proper-use-of-meteor-wrapasync-on-server
// http://stackoverflow.com/questions/29486983/save-serialport-list-with-meteor
import { Meteor } from 'meteor/meteor';
@squirelo
squirelo / bionicblaster.ino
Created March 17, 2017 14:27
bionicblaster.ino
#define myowareInPin A0
#define triggerPin D1
int myowareValue = 0;
int treshold = 650;
void setup() {
@squirelo
squirelo / Status.im ICO
Created June 20, 2017 22:37
This is the smart contract used by http://status.im for their Initial Coin Offering
pragma solidity ^0.4.11;
/// @dev `Owned` is a base level contract that assigns an `owner` that can be
/// later changed
contract Owned {
/// @dev `owner` is the only address that can call a function with this
/// modifier
modifier onlyOwner() {
@squirelo
squirelo / nimiq ICO smart contract
Created June 28, 2017 12:26
NIMIQ - NET token ethereum smart contract source code
pragma solidity ^0.4.11;
/* taking ideas from FirstBlood token */
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal returns(uint256) {
uint256 z = x + y;
assert((z >= x) && (z >= y));
return z;
}
@squirelo
squirelo / dimitri.js
Last active July 11, 2017 18:03
multi buy script
DEFAULT_GAS = 200000
var iteration = 0
var gasElemt = $('*[ng-change="gasLimitChanged=true"]');
var intervalPTR;
function doAmazingStuff() {
if (iteration == 1000) {
console.log("Stop")
clearInterval(intervalPTR);
@squirelo
squirelo / hb_all_books_dl.js
Last active March 9, 2018 22:02 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'EPUB') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});