Create the session that will manage the nested/sticky panes
-
create new session named shared
$ tmux new -s shared
-
rename current window
Search for merge conflicts by using grep and the pattern '>>>>' which is common to VCS systems such as Git, SVN, and Perforce.
Default use recursively searches based on your current folder:
$ ./conflicts.sh
Checking for conflicts in *
I've got 99 problems but merge conflicts ain't 1 :)
Alternatively you can specify a specific folder
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
) | |
type ( | |
AStruct struct { |
<?php | |
header('Content-Type: application/json'); | |
session_start(); | |
define("SESSION_SALT", "lowsaltdiet"); | |
$sessionKey = hash("sha512", SESSION_SALT . session_id()); | |
$post_data = array( | |
'session' => session_id(), |
#!/bin/sh | |
COUNT=$(cat /home/jeff/Shared/zeb.html | grep "#SESSION 'zeb' DIED." -c) | |
NOW=$(date +%s) | |
L_ERROR=$(cat /var/log/check-zeb-down)+3600 | |
if (( $COUNT >= 1 && $L_ERROR <= $NOW )); then | |
date | |
curl --request POST https://api.pushover.net/1/messages.json --data "token=SECRET_TOKEN&user=SECRET_USER&message=Zeb is linkdead!&priority=1" | |
echo -e $NOW > /var/log/check-zeb-down |
#!/bin/sh | |
for f in *.jpeg | |
do | |
BASE=$(basename "$f" .jpg) | |
mv "$f" "$BASE.jpg" | |
done | |
for f in *.jpg | |
do |
#CleanMongo
In short I ran into a lot of trouble with MongoDB not closing cleaning in my Vagrant server, so I made this little script to stop the instance, clean it, then restart.
Built for debian based systems, or anything that uses service to handle /etc/init.d scripts.
getURLParameters = (url) -> | |
result = {} | |
searchIndex = url.indexOf("?") | |
result if searchIndex is -1 | |
sPageURL = url.substring(searchIndex + 1) | |
sURLVariables = sPageURL.split("&") | |
i = 0 | |
while i < sURLVariables.length |
<?php | |
// Start a new session | |
session_start(); | |
// Configure error levels | |
error_reporting(E_ERROR); | |
ini_set('display_errors', 1); | |
// Empty response object | |
$output = (object) response; |