Skip to content

Instantly share code, notes, and snippets.

View yfgeek's full-sized avatar
🐱
Excited +1s

Ivan yfgeek

🐱
Excited +1s
View GitHub Profile
@yfgeek
yfgeek / brainfuck.js
Created November 30, 2017 14:33
Brainfuck Interpreter
/**
* Brainfuck Interpreter
* author: yfgeek
* https://github.com/yfgeek
*/
'use strict';
class Interpreter{
constructor(code,input) {
this.code = code.trim().replace(/ /g, "").replace(/(\r\n|\n|\r)/gm,"").split("");
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50505
Source Host : localhost
Source Database : blockvotes
Target Server Type : MySQL
Target Server Version : 50505
File Encoding : utf-8
# coding=utf-8
# python version:2.7
from jpype import *
import pandas as pd
reload(sys)
sys.setdefaultencoding('utf-8')
import pymysql

Keybase proof

I hereby claim:

  • I am yfgeek on github.
  • I am yfgeek (https://keybase.io/yfgeek) on keybase.
  • I have a public key ASBdvbAjMLkf1yOlgziTbzALQzNvJttyDgSCgo5N2GQhfgo

To claim this, I am signing this object:

@yfgeek
yfgeek / bitcoin-testnet-transaction.js
Created August 16, 2017 03:11
Bitcoin testnet transaction example when using browser
// For browser
$.getJSON("https://chain.so/api/v2/get_tx_unspent/BTCTEST/"+bitcoinAddress,function(result){
var last = result.data.txs.length - 1;
console.log('Current:' + last + ' ' + address);
var unspent_txid = result.data.txs[last].txid;
var unspent_vout = result.data.txs[last].output_no;
txb = new Bitcoin.TransactionBuilder(network);
txb.addInput(unspent_txid, unspent_vout);
@yfgeek
yfgeek / borromean.py
Created July 14, 2017 18:28 — forked from badmofo/borromean.py
Pure Python Borromean Ring Signatures
'''
Pure Python Borromean Ring Signatures
DEPENDS ON: pip install ecdsa
WARNING: THIS IS A PEDAGOGICAL IMPLEMENTATION.
PERFORMANCE IS HORRIBLE AND NON-CONSTANT.
CORNER CASES ARE NOT PROPERLY CHECKED.
FOR THE LOVE OF GOD USE THE CODE FROM THE ELEMENTS PROJECT.
https://gist.github.com/badmofo/2d6e66630e4a6748edb7
'''
from hashlib import sha256
@yfgeek
yfgeek / autowechat.py
Created January 29, 2017 12:28
微信自动回复
#-*- coding: utf-8 -*-
import itchat, time, re, sys
from itchat.content import *
@itchat.msg_register([TEXT])
def text_reply(msg):
if u'测试' in msg['Text'] or u'test' in msg['Text'] or u'自动' in msg['Text'] or u'回复' in msg['Text']:
itchat.send((u'不要测试辣,我是真机器人~'), msg['FromUserName'])
elif u'一凡' in msg['Text']:
itchat.send((u'哦?叫我呢?'), msg['FromUserName'])
elif u'晚安' in msg['Text']:
@yfgeek
yfgeek / post.py
Created January 23, 2017 13:52
登录并暴力发送POST请求
#-*- coding: utf-8 -*-
# Code by Ivan
# Automatically get some awesome project or repo from your following user everyday
#
# The first line of comments is English version
#
# Welcome to pull request
# Enjoy!
# Site:github.com/yfgeek