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 | |
# | |
# Utility script which can be used to trigger rebuild of a jekyll site that is | |
# managed via a git repository. Most often, you would call this script in the | |
# post-receive hook of a full (non-bare) git repository, such that the rebuild | |
# happens after a push. | |
# | |
# Run with no arguments for usage. | |
# |
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 | |
# | |
# chkconfig: 35 90 12 | |
# description: Start node apps. | |
# | |
# This grabs the name of the init script. The weird string match handles | |
# the case when the init script is called on boot as /etc/rcN/S90[name]. | |
INIT_SCRIPT_BASENAME=`basename $0` | |
SERVICE=${INIT_SCRIPT_BASENAME#S90} |
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 sh | |
# | |
# chkconfig: - 99 12 | |
# description: Start apps, monit wrapper. | |
# | |
# This script uses the monit process to handle starting and stopping a | |
# service. This can be used in server configuration management software to | |
# manage the service programatically, in the case where it's already being | |
# managed via monit. |
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 | |
# Source function library. | |
. /etc/init.d/functions | |
apply_sysctl |
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 | |
RAMDISK_SIZE="256m" | |
MOUNT_POINT="/mnt/ramdisk" | |
USER=root | |
GROUP=root | |
PERMISSIONS=775 | |
PRE_STOP_SCRIPT="/usr/local/bin/stop_ramdisk.sh" |
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
/** | |
* Illustrates methods for testing for the existence of support | |
* for setting a speaker device. | |
*/ | |
// Check for the setSinkId() method on HTMLMediaElement. | |
if (setSinkId in HTMLMediaElement.prototype) { | |
// Do the work. | |
} |
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
[:~/git … rm/live/staging/provider-pre/gcp] staging+ 1 ± TF_LOG=DEBUG terraform apply | |
2020/03/21 21:10:28 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility. | |
Use TF_LOG=TRACE to see Terraform's internal logs. | |
---- | |
2020/03/21 21:10:28 [INFO] Terraform version: 0.12.24 | |
2020/03/21 21:10:28 [INFO] Go runtime version: go1.12.13 | |
2020/03/21 21:10:28 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"} | |
2020/03/21 21:10:28 [DEBUG] Attempting to open CLI config file: /home/hunmonk/.terraformrc | |
2020/03/21 21:10:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2020/03/21 21:10:28 [INFO] CLI command args: []string{"apply"} |
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
/** | |
* iOS doesn't support beforeunload, use pagehide instead. | |
* NOTE: I tried doing this detection via examining the window object | |
* for onbeforeunload/onpagehide, but they both exist in iOS, even | |
* though beforeunload is never fired. | |
*/ | |
var iOS = ['iPad', 'iPhone', 'iPod'].indexOf(navigator.platform) >= 0; | |
var eventName = iOS ? 'pagehide' : 'beforeunload'; | |
window.addEventListener(eventName, function (event) { |
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 | |
# nfsserver | |
# | |
# Description: Manages NFS server as OCF resource | |
# by hxinwei@gmail.com | |
# NFSv4-only modifications by thehunmonkgroup at gmail dot com | |
# License: GNU General Public License v2 (GPLv2) and later | |
if [ -n "$OCF_DEBUG_LIBRARY" ]; then | |
. $OCF_DEBUG_LIBRARY |
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
--[[ | |
Wrapper for freeswitch.Dbh to fetch results into an indexed table of | |
assocative tables. | |
]] | |
function db_fetch(dbh, sql) | |
local rows = {} | |
dbh:query(sql, function(data) | |
local row = {} | |
for col, val in pairs(data) do | |
row[col] = val |
OlderNewer