docker service inspect --format='{{range .Spec.TaskTemplate.ContainerSpec.Env}}{{println .}}{{end}}' service_name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
class GoogleGeocoder | |
{ | |
public function __construct() | |
{ | |
$this->baseURL = "https://maps.google.com/maps/api/geocode/json?sensor=false"; | |
} | |
public function geocode($address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Reddit Internetsehat Bypasser | |
// @namespace None | |
// @version 0.1 | |
// @description Open imgur through webproxy.net | |
// @include http://*.reddit.com/* | |
// @include http://*.reddit.com/r/* | |
// ==/UserScript== | |
var links = document.getElementsByTagName("a"); //array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bolt! 4G LTE Auto Login | |
// @namespace halfnor.ml | |
// @version 0.0.1 | |
// @description Input user and password to My BOLT! | |
// @author Maesa Randi | |
// @include *.boltsuper4g.com/my-bolt.html | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js | |
// @grant GM_getValue | |
// @grant GM_setValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: 'info', | |
pageSettings: { | |
loadImages: false, | |
loadPlugins: false, | |
userAgent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36' | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILENAME=filename_here.csv | |
HDR=$(head -1 $FILENAME) | |
split -l 100 $FILENAME xyz | |
n=1 | |
for f in xyz* | |
do | |
if [ $n -gt 1 ]; then | |
echo $HDR > Part${n}.csv | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -z $1 ]; then | |
echo "Created by Barkeep (http://www.lostsaloon.com/technology/how-to-create-an-xml-sitemap-using-wget-and-shell-script/)" | |
echo "Usage: $0 http://webtobecrawled.com"; | |
exit | |
fi | |
sitedomain=$1 | |
wget --spider --recursive --level=inf --no-verbose --output-file=linklist.txt $sitedomain | |
grep -i URL linklist.txt | awk -F 'URL:' '{print $2}' | awk '{$1=$1};1' | awk '{print $1}' | sort -u | sed '/^$/d' > sortedurls.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You'll find duplicated ppid, those ppid are zombie parent | |
ps axo user,ppid,pid,comm | grep defunct | |
# Kill zombie parent | |
kill -9 $(ps axo ppid,comm | grep defunct | awk '{print $1}' | sort -u) | |
or | |
kill -9 $(ps -xal | grep -w Z | grep -v grep | awk '{print $4}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | |
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] | |
then | |
>&2 echo 'ERROR: Invalid installer checksum' | |
rm composer-setup.php |
echo "base64:$(openssl rand -base64 32)"
OlderNewer