Skip to content

Instantly share code, notes, and snippets.

View dan-mi-sun's full-sized avatar

dan ✨ dan-mi-sun

View GitHub Profile
@dan-mi-sun
dan-mi-sun / blockstack-proof.txt
Created June 27, 2018 12:19
blockstack proof
Verifying my Blockstack ID is secured with the address 1EB7A2BT43EtpueRSkHR5dPLARewSNXd1H https://explorer.blockstack.org/address/1EB7A2BT43EtpueRSkHR5dPLARewSNXd1H
@dan-mi-sun
dan-mi-sun / bitcoin_OP_RETURN.json
Created August 15, 2016 08:29
Series of calls to the Bitcoin JSON-RPC server returning the first OP_RETURN transfer
// Command Reference 0
$ bitcoin-cli getblockhash 228596
// Response Reference 0
000000000000025dccea46a90dd89718be32d2bba84c44cac2f390c4d146adb1
// Command Reference 1
$ bitcoin-cli getblock 000000000000025dccea46a90dd89718be32d2bba84c44cac2f390c4d146adb1
// Response Reference 1
dh@openblockchain-api:/opt/tomcat/bin$ sudo -u tomcat ./catalina.sh run
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
25-May-2016 04:01:38.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.35
25-May-2016 04:01:38.463 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 11 2016 21:57:08 UTC
25-May-2016 04:01:38.463 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.35.0
25-May-2016 04:01:38.463 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
dh@openblockchain-api:~$ sudo tail -500 /opt/tomcat/logs/
catalina.2016-05-24.log host-manager.2016-05-24.log localhost.2016-05-24.log localhost_access_log.2016-05-24.txt manager.2016-05-24.log
catalina.2016-05-25.log host-manager.2016-05-25.log localhost.2016-05-25.log localhost_access_log.2016-05-25.txt manager.2016-05-25.log
dh@openblockchain-api:~$ sudo tail -500 /opt/tomcat/logs/catalina.2016-05-25.log
[sudo] password for dh:
25-May-2016 00:45:45.760 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
25-May-2016 00:45:45.761 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal Context [/openblockchain-api] startup failed due to previous errors
25-May-2016 00:45:45.766 WARNING [http-nio-8080-exec-8] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
dh@openblockchain:~$ sudo tail -500 /opt/tomcat/logs/catalina.2016-05-24.log
24-May-2016 01:31:43.016 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.35
24-May-2016 01:31:43.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 11 2016 21:57:08 UTC
24-May-2016 01:31:43.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.35.0
24-May-2016 01:31:43.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
24-May-2016 01:31:43.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.13.0-83-generic
24-May-2016 01:31:43.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
24-May-2016 01:31:43.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-7-openjdk-amd64/jre
24-May-2016 01:31:43.020
@dan-mi-sun
dan-mi-sun / gist:cc7d4475c5bb1028563a
Created March 17, 2015 09:54
danielsan openname verification
Verifying that +danielsan is my openname (Bitcoin username). https://onename.com/danielsan

Keybase proof

I hereby claim:

  • I am dan-mi-sun on github.
  • I am danielsan (https://keybase.io/danielsan) on keybase.
  • I have a public key whose fingerprint is 2CAC 54F4 DCEF C1BA 5B62 6442 0DF0 BD31 1A43 3BAB

To claim this, I am signing this object:

@dan-mi-sun
dan-mi-sun / gist:9ec0b03021d2641b9d48
Created July 5, 2014 18:54
Display relevant projects for a creative based on matching skills
<% user_skills = [] %>
<% @user.skills.each do |skill| %>
<% user_skills << skill %>
<% end %>
<% @projects.each do |project| %>
<% project_skill = [] %>
<% project_skill << project.skills %>
<% if (user_skills & project_skill).length > 0 %>
<%= project.title %>
// Constructor function for a Duck
function Duck(game) {
this.game = game;
this.el = $("#duck-template").clone();
this.el.removeAttr("id");
// Add a callback for when the Duck is clicked (shot!)
var _this = this;
$(this.el).click(function() {
$(document).ready(function() {
console.log("Welcome to Duck Hunt!");
// Behaviour for the play again link
$('#play-again').click(function(e) {
$("#game-over").toggle();
new Game();
});
// Moves the crosshair with the mousepointer