This file contains hidden or 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 | |
| #set -e | |
| DOMAIN='domain.com' | |
| NAME='sub1' | |
| TYPE='A' | |
| APIKEY='' | |
| LASTIP=/tmp/`basename "$0"` | |
| LASTJS="${LASTIP}.json" |
This file contains hidden or 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 | |
| #set -e | |
| apk add --no-cache --virtual .build-deps bash gcc libc-dev make openssl-dev pcre-dev zlib-dev linux-headers curl gnupg git libxml2-dev libxslt-dev gd-dev geoip-dev | |
| git clone https://github.com/arut/nginx-rtmp-module.git -b v${NGINX_RTMP_VERSION} /tmp/ngx-rtmp-module | |
| git clone https://github.com/arut/nginx-ts-module.git -b v${NGINX_TS_VERSION} /tmp/ngx-ts-module | |
| git clone https://github.com/arut/nginx-live-module.git /tmp/ngx-live-module | |
| curl -fSL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -o /tmp/nginx.tar.gz |
This file contains hidden or 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 | |
| #set -e | |
| sudo tcpdump -vv -A -s 0 -i eth0 udp port 1900 and host 239.255.255.250 |
This file contains hidden or 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 | |
| # Gnome 3 can be customised from the command line via the gsettings command | |
| # This script should help you to find what you're looking for by | |
| # listing the ranges for all keys for each schema | |
| for schema in $(gsettings list-schemas | sort) | |
| do | |
| for key in $(gsettings list-keys $schema | sort) | |
| do | |
| value="$(gsettings get $schema $key | tr "\n" " ")" |
This file contains hidden or 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
| string random_string(size_t len) | |
| { | |
| stra str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
| stra r_; | |
| int pos; | |
| random_shuffle(str.begin(), str.end()); | |
| srand(time(0)); | |
| while(r_.size() != len) { |
This file contains hidden or 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
| #include <asio.hpp> | |
| typedef __UINT64_TYPE__ uint64; | |
| asio::io_service iosvc; | |
| asio::steady_timer t1(iosvc); | |
| asio::system_timer t2(iosvc); | |
| void time1(const std::error_code err, asio::steady_timer* tmr) |
This file contains hidden or 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
| #include "daemon.h" | |
| static stra pidf_; | |
| void daemon::start(PCSA pidf) | |
| { | |
| pidf_ = pidf; | |
| { |
This file contains hidden or 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 | |
| #set -e | |
| repo=( | |
| "https://github.com/jquery/jquery.git" | |
| ); | |
| cur=`pwd`; |
This file contains hidden or 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
| gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf 11.pdf 12.pdf |
This file contains hidden or 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
| // request v2.81 + iconv-lite v0.4.18 | |
| var ICONV = require('iconv-lite'); | |
| var request = require('request'); | |
| request.get(opt) | |
| .pipe(ICONV.decodeStream('euc-kr')) | |
| .collect(function(err, decodedBody) | |
| { | |
| console.log(decodedBody.toString()); |