Skip to content

Instantly share code, notes, and snippets.

View xCoreDev's full-sized avatar

xCoreDev

View GitHub Profile
@xCoreDev
xCoreDev / trollbox.js
Last active August 30, 2016 22:28
Node.JS - Quick & Dirty Poloniex Trollbox IRC Relay. Debian/Ubuntu: apt-get install libicu-dev / NPM Modules: npm install autobahn ent irc irc-colors
var autobahn = require('autobahn');
var ent = require('ent');
var irc = require('irc');
var c = require('irc-colors');
var wsuri = "wss://api.poloniex.com";
var connection = new autobahn.Connection({
url: wsuri,
realm: "realm1"
});
@xCoreDev
xCoreDev / cpustatus.sh
Created January 3, 2016 19:30 — forked from ecampidoglio/cpustatus.sh
A Bash script that prints the current state of the CPU on a Raspberry Pi. It displays variables like temperature, voltage and speed.
#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"
@xCoreDev
xCoreDev / pretty-rpc.sh
Last active March 29, 2016 14:09
Pretty JSON display for Vanillacoin RPC calls
#!/bin/bash
# Check root or user
if (( EUID != 0 )); then
echo -e "\n- - - - - - - - - \n"
echo "You are not enough root for this !"
echo -e "\n- - - - - - - - - \n"
exit
fi
@xCoreDev
xCoreDev / create-swap.sh
Created October 1, 2015 20:18
Create a 4GB swapfile
#!/bin/sh
# size of swapfile in megabytes
swapsize=4096
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then