Skip to content

Instantly share code, notes, and snippets.

View dendisuhubdy's full-sized avatar
🚀
at the speed of light

Dendi Suhubdy dendisuhubdy

🚀
at the speed of light
View GitHub Profile
@alex-zige
alex-zige / gist:9103810
Created February 19, 2014 23:29
Curl post json file to api url endpoints for API testing
curl -H "Content-Type: application/json" --data @your-json-file-name.json http://localhost:XXXX/api-end-point
@tyspa1
tyspa1 / stt
Created February 22, 2014 21:00
Use Google Speech API with Python using Pyaudio and flac for Windows
import pyaudio
import wave
import audioop
from collections import deque
import os
import urllib2
import urllib
import time
import math

NOTE: This was first authored on 26 Feb 2014. Things may have changed since then.

C++'s Templates

C++'s templates could be seen as forming a duck typed, purely functional code generation program that is run at compile time. Types are not checked at the initial invocation stage, rather the template continues to expand until it is either successful, or runs into an operation that is not supported by that specific type – in that case the compiler spits out a 'stack trace' of the state of the template expansion.

To see this in action, lets look at a very simple example:

template 
@kwk
kwk / CMakeLists.txt
Last active June 9, 2018 17:55
Print the current date + time in UTC using boost::date_time
cmake_minimum_required(VERSION 2.8.8)
project(datetime)
find_package(Boost COMPONENTS date_time REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(datetime datetime.cpp)
target_link_libraries(datetime ${Boost_LIBRARIES})
@janx
janx / centos-bitcoind-guide.markdown
Last active May 8, 2019 05:27
Install bitcoind on CentOS 6.5

##RPM Packages##

sudo yum install qt-devel protobuff-devel qrencode-devel

##Switch to user bitcoind##

sudo useradd bitcoind
sudo su - bitcoind
mkdir bitcoind

mkdir bitcoind/deps

@superkojiman
superkojiman / bin2sc.py
Created April 22, 2014 03:15
Convert bin to shellcode.
#!/usr/bin/env python
import sys
if __name__ == "__main__":
if len(sys.argv) < 2:
print "usage: %s file.bin\n" % (sys.argv[0],)
sys.exit(0)
shellcode = "\""
ctr = 1
maxlen = 15
@chirag64
chirag64 / irssi.conf.md
Last active June 13, 2021 21:13
Irssi configuration
Manually editing the configuration files isn't recommended since its kind of complicated. It is recommended to configure using irssi's commands.
  • Start irssi and connect to a server. Then enter the commands.

  • Auto-connect to a server during startup. Password is server password but can be used as a user password for quick authentication. This method is useful since it authenticates you before irssi tries to connect to the channels, so you are able to join channels where authentication is required. (Password is optional and will be visible in the configuration file in plain text).

/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 6697 password

If you keep getting SSL errors after starting irssi, try removing SSL certificate verification:

@romanz
romanz / fullnode.md
Last active March 20, 2024 19:05
Bitcoin Full Node on AWS Free Tier

Bitcoin Full Node on AWS Free Tier

Provisioning

  • Launch one T2 micro instance, using Ubuntu 14.04 LTS AMI.
  • Open SSH and Bitcoin Protocol TCP ports: 22, 8333.
  • Attach 40GB EBS (General-Purpose SSD) volume for blockchain storage to /dev/sdf.

The pricing should be ~3$ for the first year (assuming 30GB upload per month). See here for more details.

@kostaz
kostaz / Compile_Bitcoin_on_Ubuntu_14_04
Last active September 3, 2023 10:31
Compile Bitcoin on Ubuntu 14.04
Assuming the username of the Ubuntu user is "theusername".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
@epixoip
epixoip / 8x980_init.md
Last active August 21, 2017 10:52
World's First 8x GTX 980 cudaHashcat Benchmark