Skip to content

Instantly share code, notes, and snippets.

View timxor's full-sized avatar

Tim Siwula timxor

View GitHub Profile
@timxor
timxor / sampleREADME.md
Created October 17, 2018 01:03 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@timxor
timxor / haskell-error-001
Created September 24, 2018 01:54
Haskell Ambiguous type variable error message. Clueless..
Ambiguous type variable ‘a0’ arising from a use of ‘getLast’
prevents the constraint ‘(Read a0)’ from being solved.
Relevant bindings include
transferTXIDM :: Maybe a0 (bound at bin/FaeServer/App.hs:93:5)
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance (Read b, Read a) => Read (Either a b)
-- Defined in ‘Data.Either’
instance forall k (s :: k). Read (Proxy s)
-- Defined in ‘Data.Proxy’
@timxor
timxor / ghci
Created September 17, 2018 22:30
ghci seems to be broken on my mac
[~/Documents/Projects/Fae]$ghci
GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help
<interactive>:1:19: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:43: error:
Not in scope: ‘System.IO.stdin’
No module named ‘System.IO’ is imported.
extern crate diesel;
extern crate payment_api;
use std::process::Command;
use payment_api::*;
fn main() {
let connection = establish_connection();
// execute a cli to generate a key pair
let output = Command::new("/Users/tim.siwula/Desktop/parity/target/debug/./ethkey")
#![feature(plugin)]
#[macro_use] extern crate diesel;
#[macro_use] extern crate serde_json;
#[macro_use] extern crate serde_derive;
extern crate dotenv;
//extern crate uuid;
pub mod schema;
pub mod models;
#![feature(plugin)]
#![plugin(serde_macros)]
use std::ops::Deref;
use rocket::http::Status;
use rocket::request::{self, FromRequest};
use rocket::{Request, State, Outcome};
use r2d2;
use diesel::PgConnection;
use r2d2_diesel::ConnectionManager;
use diesel;
use diesel::prelude::*;
use diesel::PgConnection;
use schema::users;
#[derive(Queryable, Deserialize, Serialize)]
pub struct User {
pub id: Option<i32>,
pub first_name: String,
pub last_name: String,
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
extern crate dotenv;
#[macro_use] extern crate rocket_contrib;
#[macro_use] extern crate diesel;
extern crate payment_api;
extern crate r2d2;
extern crate r2d2_diesel;
@timxor
timxor / zcash.conf
Last active June 11, 2018 21:43
~/Library/Application\ Support/Zcash/zcash.conf config file not detected/updating on mac
# on macos in directory:
# ~/Library/Application\ Support/Zcash/zcash.conf
rpcuser=username
rpcpassword=`head -c 32 /dev/urandom | base64`
### connect to main network
# mainnet=1
# addnode=mainnet.z.cash
@timxor
timxor / tim_cpp_benchmarks.md
Created August 23, 2017 23:36
tim_cpp_eth_benchmarks_august

*** :-/ ***

➜  performance git:(develop) ✗ git rev-parse HEAD
1f06a79fd6ee189a3d935201b77cbaf10fc511a7
➜  performance git:(develop) ✗ git pull upstream develop
From https://github.com/ethereum/cpp-ethereum
 * branch                develop    -> FETCH_HEAD
Already up-to-date.
➜ performance git:(develop) ✗ git rev-parse HEAD