Skip to content

Instantly share code, notes, and snippets.

View mspreij's full-sized avatar
🧗
OK

Maarten Spreij mspreij

🧗
OK
View GitHub Profile
# prompt
export PS1="[\u@\h:\w]\[\e[1;32m\]\$(current_git_repository)\[\033[0m\]\$ "
# function used in prompt
function current_git_repository {
local branch=`git branch 2>/dev/null | grep ^\* | cut -b3-`;
local star='';
if [ "$branch" != '' ]; then
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && star='*' || star='';
echo "[$branch$star]"
function (result) {
if (result.success) {
// do things with result.data
}else{
alert(message); // or modal notify, or ...
}
console.log(debug);
}
alias glb="git reflog | grep checkout | cut -d\ -f6,8 | sed 's/ /\n/' | head -n50 | "' awk '\''!x[$0]++'\'' '" | egrep [g-z] | head -n8"
218.22.148.105 - - [03/May/2017:13:12:17 +0200] "GET /?author=5 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
114.69.233.82 - - [03/May/2017:13:12:55 +0200] "GET /?author=6 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
193.239.233.236 - - [03/May/2017:13:13:33 +0200] "GET /?author=7 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
218.90.148.177 - - [03/May/2017:13:14:11 +0200] "GET /?author=8 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
61.158.188.21 - - [03/May/2017:13:14:51 +0200] "GET /?author=9 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
155.4.33.255 - - [03/May/2017:13:15:27 +0200] "GET /?author=10 HTTP/1.1" 404 50082 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0"
119.93.25.17
#!/bin/bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# word="${TM_SELECTED_TEXT}${TM_CURRENT_WORD}"
echo selected: ${TM_SELECTED_TEXT}, word: ${TM_CURRENT_WORD}
select message, group_concat(facultyId SEPARATOR ',')
from mail_defaults
where code = 'locationSelectionReminder'
group by message
@mspreij
mspreij / itunes.sh
Created November 23, 2016 11:46 — forked from mateuszgachowski-snippets/itunes.sh
Bash: iTunes CLI
#!/bin/sh
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# @edited Mateusz Gachowski
####################################
showHelp () {
#!/usr/bin/php
<?php
ob_start();
require 'inc/func.inc.php';
if ($argv[0] == 'php') array_shift($argv);
$script = array_shift($argv); // CLI input array, first item = scriptname, discard
// usage:
if (count($argv) == 0) {
@mspreij
mspreij / red_cross.svg
Created August 13, 2015 15:07
SVG red cross
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
senanga@hermes:~/nemo/www$ web1 -v cat /app/api.www/v3/shoplet/script.js
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to web1.senanga.net [141.138.198.37] port 22.
debug1: Connection established.
debug1: identity file /home/senanga/.ssh/id_rsa type 1
debug1: identity file /home/senanga/.ssh/id_rsa-cert type -1
debug1: identity file /home/senanga/.ssh/id_dsa type -1
debug1: identity file /home/senanga/.ssh/id_dsa-cert type -1