start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
# Check to see if we're already running the session | |
tmux has-session -t main &> /dev/null | |
if [ $? != 0 ] ; then | |
# Create overall tmux session | |
tmux new-session -d -s main -n java > /dev/null | |
tmux split-window -v |
#!/bin/sh | |
# script to automate the creation of chroot jail | |
# w/ minimal executables to run git | |
export CHROOT=/var/chroot | |
function copy_binary() { | |
for i in $(ldd $*|grep -v dynamic|cut -d " " -f 3|sed 's/://'|sort|uniq) | |
do | |
cp --parents $i $CHROOT |
chance = 39.6 | |
martimulti = 1.85 --multiplier for loses | |
streak = 20 -- cover 20 bets | |
risk = (martimulti ^ streak) * (streak/(streak *(martimulti - 1))) | |
boomstreak = 13 -- cover 13 bets on a Boom | |
boomrisk = (martimulti ^ boomstreak) * (boomstreak/(boomstreak *(martimulti - 1))) | |
startbalance = balance |
<?php | |
/** | |
* Define google url shortener api | |
*/ | |
define("API_URL", "https://www.googleapis.com/urlshortener/v1/url?key="); | |
class GoogleURL | |
{ | |
/** | |
* |
import socket | |
msgFromClient = "Hello UDP Server" | |
bytesToSend = str.encode(msgFromClient) | |
serverAddressPort = ("127.0.0.1", 20001) | |
bufferSize = 1024 | |
# Create a UDP socket at client side | |
UDPClientSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM) |
#!/bin/sh | |
# This is a skeleton of a bash daemon. To use for yourself, just set the | |
# daemonName variable and then enter in the commands to run in the doCommands | |
# function. Modify the variables just below to fit your preference. | |
daemonName="DAEMON-NAME" | |
pidDir="." | |
pidFile="$pidDir/$daemonName.pid" |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Tooltips</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> |
<?php | |
use Workerman\Worker; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
// Channel Server. | |
$channel_server = new Channel\Server('0.0.0.0', 2206); | |
$worker = new Worker('websocket://0.0.0.0:4236'); | |
// 6 processes. | |
$worker->count=6; |
[[NSNotificationCenter defaultCenter] addObserverForName:nil | |
object:nil | |
queue:nil | |
usingBlock: ^(NSNotification *notification) { | |
NSLog(@"Received Notification:\n%@\n%@", | |
notification.name, | |
notification.userInfo); | |
}]; |