Skip to content

Instantly share code, notes, and snippets.

View Jzarecta's full-sized avatar
💭
new year new repos coming in.

JZA Jzarecta

💭
new year new repos coming in.
View GitHub Profile
URL targetUrl = new URL(targetURL);
HttpURLConnection httpConnection = (HttpURLConnection) targetUrl.openConnection();
httpConnection.setDoOutput(true);
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Type", "application/json");
String input = "{\"action\":\"authenticate\",\"public-key\":\"\",\"user-key\":\"\"}";
OutputStream outputStream = httpConnection.getOutputStream();
@Jzarecta
Jzarecta / smartcontracts
Created December 19, 2015 11:17
Python code for smart contracts and color coins
#!/usr/bin/env python
"""
bitpaint.py
~~~~~~~~~~~
Simple command-line utility to use the Bitcoin blockchain to track and manage so-called "colored coins", or "smart contracts/securities".
Caution:
- Private keys are stored in plaintext in your configuration file
- Colored coin tracking is implemented following the "output
@Jzarecta
Jzarecta / gist:01a4d3f401496879c008
Created February 6, 2016 12:41
Drakstats perl scripts
#!/usr/bin/perl
################################################################################
# #
# #
# Copyright (C) 2004-2005 Mandriva #
#
# Daouda Lo <[email protected]> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License Version 2 as #
#!/bin/env python2
__title__ = "TrendBot"
__author__ = "JZA"
__email__ = "[email protected]"
__license__ = "Apache Foundation License v2"
__version__ = "0.5 Alpha"
# TrendBot - A bot for checking out trend on the
Verifying that +jzarecta is my blockchain ID. https://onename.com/jzarecta
Verifying that +jzarecta is my blockchain ID. https://onename.com/jzarecta
@Jzarecta
Jzarecta / signclipboard.sh
Created March 25, 2016 18:23
Script to sign your clipboard on the go
#!/bin/bash
########################################
### signclipboard ##
### gpg sign your content on the go ##
### by: JZA ##
########################################
# choose your desired keyid
keyid = '7F4C2614'
# Get the clipboard content
module.js:457
throw err;
^
Error: Cannot find module 'yargs'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/jza/public_html/node-sentinel/src/app.js:49:6)
@Jzarecta
Jzarecta / gist
Created September 25, 2016 23:49
$ npm ls yargs
/home/jza/public_html/node-sentinel
└── (empty)
npm ERR! code 1
@Jzarecta
Jzarecta / What Is a Blockchain DASH School 1.es.srt
Created September 26, 2016 14:00
Subtitles for transcript for DASH school episode 1
1
00:00:07,810 --> 00:00:10,160
Hola, y bienvenido a DASH School
2
00:00:10,160 --> 00:00:12,720
Soy tu profesora, Amanda B. Johnson
3
00:00:12,720 --> 00:00:16,720