Skip to content

Instantly share code, notes, and snippets.

View franz101's full-sized avatar
🎯
Focusing

franz101 franz101

🎯
Focusing
View GitHub Profile
@franz101
franz101 / Google Analytics.py
Last active February 11, 2018 12:32
Google Analytics in Python
#https://ga-dev-tools.appspot.com/query-explorer/
#https://www.linkedin.com/pulse/how-capture-google-analytics-client-id-custom-dimension-jeremy-hill/
@franz101
franz101 / DOCKER HACKS.txt
Last active February 19, 2018 14:51
DOCKER HACKS
Docker Hacks:
- Use Nvidia-Runtime: --runtime=nvidia
- Delete unused images:
docker images -q |xargs docker rmi
- Detectron Build example:
docker build -t detectron_fb .
@franz101
franz101 / purchase.sol
Last active April 25, 2018 16:18
Solidity by example
pragma solidity ^0.4.22;
contract Purchase {
uint public value;
address public seller;
address public buyer;
enum State { Created, Locked, Inactive }
State public state;
// Ensure that `msg.value` is an even number.
@franz101
franz101 / stromanbieter.sol
Created May 2, 2018 14:33
Stromanbieter Beispiel
pragma solidity ^0.4.15;
contract City {
address public owner; // owner of the contract
struct User { // User structure
uint id;
address taker;
string name;
uint monatskosten;
pragma solidity ^0.4.15;
import "./Stromanbieter.sol";
contract SmartCity is Stromanbieter{
address public owner; // owner of the contract
struct Citizen { // User structure
uint id;
bool exists;
while [ 1 ]
do
screencapture -x ~/Desktop/Capture/$(date +%s).jpg
sleep 1
done
@franz101
franz101 / machine.js
Last active February 21, 2020 08:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@franz101
franz101 / machine.js
Last active February 26, 2020 14:44
Generated by XState Viz: https://xstate.js.org/viz
const orderMachine = Machine({
id: 'order',
initial: 'start',
context:
{},
states: {
start: {
on: {BUSINESS:'business.idle',
CONSUMER:'consumer.idle'
@franz101
franz101 / machine.js
Created March 2, 2020 12:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions