THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#!/bin/bash | |
# This script is used by Nagios to post alerts into a Slack channel | |
# using the Incoming WebHooks integration. Create the channel, botname | |
# and integration first and then add this notification script in your | |
# Nagios configuration. | |
# | |
# All variables that start with NAGIOS_ are provided by Nagios as | |
# environment variables when an notification is generated. | |
# A list of the env variables is available here: |
import ( | |
"crypto/md5" | |
"encoding/hex" | |
) | |
func GetMD5Hash(text string) string { | |
hasher := md5.New() | |
hasher.Write([]byte(text)) | |
return hex.EncodeToString(hasher.Sum(nil)) | |
} |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Finishing this guide you'll get:
Specification of latest running installation:
var AWS = require('aws-sdk'), | |
fs = require('fs'); | |
// For dev purposes only | |
AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); | |
// Read in the file, convert it to base64, store to S3 | |
fs.readFile('del.txt', function (err, data) { | |
if (err) { throw err; } |
<?php | |
//server-side code where we save the given drawing in a PNG file | |
$img = filter_input(INPUT_POST, 'image', FILTER_SANITIZE_URL); | |
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING); | |
//see http://j-query.blogspot.fr/2011/02/save-base64-encoded-canvas-image-to-png.html | |
$img = str_replace(' ', '+', str_replace('data:image/png;base64,', '', $img)); | |
$data = base64_decode($img); |
(ns fixxer.dadata | |
(:require [clj-http.client :as http] | |
[cheshire.core :as json])) | |
(def api-key "your-api-key") | |
(def secret-key "your-secret-key") | |
(defn clean [request] | |
(->> request | |
json/generate-string |
#!/usr/bin/env bash | |
progname=$(basename $0) | |
version="1.0 (2014-08-17)" | |
step=2 | |
function create_hash { | |
openssl dgst -sha1 -binary <<< "$1" | xxd -p | |
} |
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
<?php | |
$ghost_data = json_decode(file_get_contents("./GhostData.json"),true) ; | |
foreach ($ghost_data['data']['posts'] as $key => $value) { | |
$created_at = date("c",$value["created_at"]/1000); | |
$title = str_replace('\\','\\\\',$value["title"]) ; | |
$title = str_replace('"','\"',$title) ; |