Skip to content

Instantly share code, notes, and snippets.

View geek-at's full-sized avatar
🐢

Christian Haschek geek-at

🐢
View GitHub Profile
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"hideControls": false,
"id": 18,
"links": [],
const int pin_all = D0;
const int pin_blue = D2;
#include <ESP8266WiFi.h>
const char* ssid = "your_wifi_name_here";
const char* password = "your_wifi_password_here";
int fade_delay = 2; //how many milliseconds between pulses (the lower, the faster the light changes)
//code starts here
@geek-at
geek-at / raspi_preparestream.sh
Created March 28, 2018 07:05
This script will install everything needed to stream your PiCam over the network with very little CPU usage
#!/bin/bash
apt-get update
apt-get install -y git cmake autoconf bc libvpx-dev libx264-dev libjpeg-dev build-essential libtool autoconf ffmpeg #raspberrypi-kernel-headers
wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz -O - | tar xvzf -
cd live
./genMakefiles linux
sudo make CPPFLAGS=-DALLOW_RTSP_SERVER_PORT_REUSE=1 install
@geek-at
geek-at / ethpay.php
Created June 9, 2017 21:41
PHP Ethereum payment class
<?php
define('RPC_IP','127.0.0.1');
define('RPC_PORT',8545);
require 'libs/ethereum-php/ethereum.php';
$e = new EthPay();
class EthPay
{
@geek-at
geek-at / easybank.class.php
Created April 3, 2018 19:33
php wrapper for read only access to easybank.at
<?php
/*
* EasyBank.at client lib
* Reverse engineered by looking at the API calls of the app
*
* Example usage:
*
* <?php
* include_once('easybank.class.php');
from ctypes import *
import math
import random
import time
import os
def sample(probs):
s = sum(probs)
probs = [a/s for a in probs]
r = random.uniform(0, 1)
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#define wifi_ssid "YourWIfiName"
#define wifi_password "YourWifiPassword"
const char* mqttServer = "192.168.1.61"; //IP of your MQTT Server
const int mqttPort = 1883; // Port of your MQTT server
//pins change these if you used different pins
### Keybase proof
I hereby claim:
* I am geek-at on github.
* I am geek_at (https://keybase.io/geek_at) on keybase.
* I have a public key ASAvzF9dHs0BRtZBYM5m2LiyWafirsvb6qDoy5Bn7B5p6wo
To claim this, I am signing this object:
@geek-at
geek-at / example.php
Created August 10, 2020 00:32
PHP example for nsfw-categorize.it
<?php
$nsfw = new NSFW();
// Example 1: upload images to check later
//
$results = $nsfw->uploadFile('image1.jpg',true);
if(is_array($results))
echo "Classification done. Image is {$results['classification']}".PHP_EOL;
@geek-at
geek-at / example.sh
Created August 10, 2020 00:32
Bash example for nsfw-categorize.it
#!/bin/sh
# Test image1.jpg
curl -s -F "image=@image1.jpg" "https://nsfw-categorize.it/api/upload"
# Let the API analyze an externally hosted image
curl -s "https://nsfw-categorize.it/api/upload?url=https://i.imgur.com/wubvFTM.jpeg"