Skip to content

Instantly share code, notes, and snippets.

@NickCody
NickCody / Busy.java
Created January 8, 2020 03:27
Simple Java program to saturate CPU's
package com.primordia.monba.test;
public class Busy {
public static void main(String[] args) {
for (int i = 0; i < 40; i++) {
Runnable runnable = () -> {
Thread t = Thread.currentThread();
long l =0;
while(true) {
l++;
@NickCody
NickCody / lps.py
Created April 28, 2019 22:05
lps.py
#!/usr/bin/env python
import time
import sys
def epoch():
return int(time.time())
c = epoch()
l = 0
@NickCody
NickCody / install-tmux.sh
Last active March 17, 2019 14:21 — forked from pokev25/install-tmux.sh
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install -y gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
@NickCody
NickCody / keybase.md
Created September 23, 2014 03:58
keybase.md

Keybase proof

I hereby claim:

  • I am nickcody on github.
  • I am nickcody (https://keybase.io/nickcody) on keybase.
  • I have a public key whose fingerprint is A949 7527 C54E 48B6 094D 5246 3663 7784 6C61 D5A3

To claim this, I am signing this object:

@NickCody
NickCody / status.bash
Created March 2, 2014 20:36
Scala Script vs. Bash Script
schedulerClassName="Gt4Scheduler"
status() {
lines=$(jps -l | fgrep $schedulerClassName)
if [ $? -eq 0 ]; then
echo "$lines"
else
echo "Not running"
fi
return 0