Skip to content

Instantly share code, notes, and snippets.

package testing.blog.waynepie.blogtesting;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Intent;
@kuzzmi
kuzzmi / install-node-npm
Created April 4, 2015 14:13
Node.js + NPM
mkdir $HOME/local
mkdir $HOME/node-latest-install
cd $HOME/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=$HOME/local
make install
curl https://www.npmjs.org/install.sh -L | sh
@kuzzmi
kuzzmi / .jshintrc
Last active August 29, 2015 14:25
Project bootstrap files
{
"node" : true,
"browser" : true,
"esnext" : true,
"bitwise" : false,
"camelcase" : true,
"curly" : true,
"eqeqeq" : true,
"immed" : true,
"indent" : 4,
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/nodejs/node.git
@kuzzmi
kuzzmi / timers.debug.js
Last active November 24, 2015 14:43
Hooking timeouts and intervals to get data about active timers and intervals
window._setTimeout = window.setTimeout;
window._setInterval = window.setInterval;
window._clearTimeout = window.clearTimeout;
window._clearInterval = window.clearInterval;
window.activeTimers = [];
window.activeIntervals = [];
function set(what, container, fn, delay, callback) {
var timerID, message;
var fnStr = fn ? fn.toString() : undefined;
#!/bin/bash
timedatectl set-ntp true
curl -sL "https://www.archlinux.org/mirrorlist/?country=DE&country=CH&country=UA&protocol=http&protocol=https&ip_version=4" > /etc/pacman.d/mirrorlist.new
sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.new
rankmirrors -n 6 /etc/pacman.d/mirrorlist.new > /etc/pacman.d/mirrorlist
(
#echo o # Create a new empty DOS partition table
1c1
< en:
---
> en:
7c7,10
< owntxt: "Bitcoin.org is the original domain name used with the first Bitcoin website. It was registered and is still managed by <a href=\"#development#\">Bitcoin core developers</a> and by additional community members, with the input of <a href=\"#community#\">Bitcoin communities</a>. Bitcoin.org is not an official website. Just like nobody owns the email technology, nobody owns the Bitcoin network. As such, nobody can speak with authority in the name of Bitcoin."
---
> owntxt: "Bitcoin.org was originally registered and owned by Bitcoin's first two developers, <a href=\"https://en.bitcoin.it/wiki/Satoshi_Nakamoto\">Satoshi Nakamoto</a> and <a href=\"https://en.bitcoin.it/wiki/Sirius\">Martti Malmi</a>. When Nakamoto left the project, he gave ownership of the domain to additional people, separate from the Bitcoin developers, to spread responsibility and prevent any one person or group from easily gaining control over the Bitcoin project."
> owntxt2: "From 2011 to 2013
@kuzzmi
kuzzmi / main.go
Last active October 31, 2023 08:22
/*
Q1. We need a way to generate a random sequence of lower case letters and digits, and in the future may need other combinations. For example,
1. 7ns32bkzgg
2. 85674
3. mxxk9gk6a4n9thq59mfx
Please provide a solution in Go (any recent version of Go) - we are mostly interested in the interface and less interested in the implementation.
*/