Skip to content

Instantly share code, notes, and snippets.

View elmariachi111's full-sized avatar
🦜
meow

Stefan Adolf elmariachi111

🦜
meow
View GitHub Profile
@elmariachi111
elmariachi111 / SigninButton.jsx
Created March 5, 2018 17:45
blockstagram / SigninButton.jsx
import React from 'react';
import * as blockstack from 'blockstack'
export default class SigninButton extends React.Component {
onClick (evt) {
evt.preventDefault();
if (this.props.userData) {
blockstack.signUserOut('/');
} else {
@elmariachi111
elmariachi111 / index.jsx
Last active March 6, 2018 00:55
blockstagram / index.jsx
const blockstack = require( 'blockstack' );
const { getPublicKeyFromPrivate } = require('blockstack');
const { encryptECIES, decryptECIES } = require('blockstack/lib/encryption')
...
class App extends React.Component {
constructor() {
super()
this.state = {
Verifying my Blockstack ID is secured with the address 1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7 https://explorer.blockstack.org/address/1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7
Verifying my Blockstack ID is secured with the address 1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7 https://explorer.blockstack.org/address/1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7
@elmariachi111
elmariachi111 / seed.js
Created January 28, 2018 21:44
create a iota seed in plain js
function createSeed(){
const seedsize = 81;
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ9";
let seed = "";
for (var i = 0, n = chars.length; i < seedsize; ++i) {
seed += chars.charAt(Math.floor(Math.random() * n));
}
return seed;
}
@elmariachi111
elmariachi111 / README.md
Last active January 4, 2018 14:10
Cryptocurrency Exchange tickers using ccxt

Cryptocurrency Exchange tickers using ccxt

queries tickers from various cryptocurrency exchanges. See https://github.com/ccxt/ccxt for all resources

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Exchange      β”‚ BTC/EUR       β”‚ ETH/EUR       β”‚ LTC/EUR      β”‚ XMR/EUR       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ coinmarketcap β”‚ 12150.4880623 β”‚ 817.591620461 β”‚ 193.38186035 β”‚ 326.259801595 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
@elmariachi111
elmariachi111 / package.json
Last active May 24, 2020 13:08
webpack production demo file
{
"name": "symfony",
"version": "1.0.0",
"description": "Symfony Standard Edition ========================",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
@elmariachi111
elmariachi111 / feigenbaum.go
Last active July 28, 2017 09:09
Feigenbaum's bifurcation diagram in Go
package main
import (
"image"
"os"
"image/png"
"image/color"
"image/draw"
"runtime"
)
@elmariachi111
elmariachi111 / import_gtfs.sql
Last active May 24, 2020 13:07
GTFS: MySQL Table DDL and Load Data Infile directives and spatial indices
# replace <rootpath> with the base path of your gtfs files...
DROP TABLE IF EXISTS agency;
CREATE TABLE agency
(
agency_id VARCHAR(10) PRIMARY KEY NOT NULL,
agency_name VARCHAR(255) NOT NULL,
agency_url VARCHAR(255) NOT NULL,
agency_timezone VARCHAR(20) NOT NULL,
agency_lang VARCHAR(10),
@elmariachi111
elmariachi111 / AcmeMemcached.php
Last active September 12, 2017 15:32
Symfony2 Memcached settings for persistent connections
<?php
namespace Acme\CoreBundle\Classes\Cache;
class AcmeMemcached extends \Memcached {
function __construct($persistent_id)
{