Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
<?php | |
if (isset($_GET['ajax'])) { | |
session_start(); | |
$handle = fopen('/private/var/log/system.log', 'r'); | |
if (isset($_SESSION['offset'])) { | |
$data = stream_get_contents($handle, -1, $_SESSION['offset']); | |
echo nl2br($data); | |
} else { | |
fseek($handle, 0, SEEK_END); | |
$_SESSION['offset'] = ftell($handle); |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
curl -X POST 'https://api.datasift.com/push/create' \ | |
-d 'name=connectorawssqs' \ | |
-d 'hash=SourceStreamHash' \ | |
-d 'output_type=sqs' \ | |
-d 'output_params.format=json_new_line' \ | |
-d 'output_params.queue=DataSift' \ | |
-d 'output_params.auth.access_key=YourAmazonAWSAccessKey' \ | |
-d 'output_params.auth.secret_key=YourAmazonAWSSecretKey' \ | |
-d 'output_params.delivery_frequency=60' \ | |
-d 'output_params.max_size=102400' \ |
#!/bin/bash | |
# version: 1.0 | |
# author: Sorin Sbarnea | |
require_clean_work_tree_git () { | |
git rev-parse --verify HEAD >/dev/null || exit 1 | |
git update-index -q --ignore-submodules --refresh | |
err=0 | |
if ! git diff-files --quiet --ignore-submodules |
// script moved to http://github.com/b1rdex/nw-contextmenu |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
<?php | |
/* | |
* Warning! Read and use at your own risk! | |
* | |
* This tiny proxy script is completely transparent and it passes | |
* all requests and headers without any checking of any kind. | |
* The same happens with JSON data. They are simply forwarded. | |
* | |
* This is just an easy and convenient solution for the AJAX |