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
#!/usr/bin/php | |
<?php | |
// ##### definitions ##### | |
define("DAEMON_NAME", "daemon-sample"); | |
define("DAEMON_ROOT", "/tmp/daemon-sample"); | |
define("DAEMON_PID", "/run/daemon-sample.pid"); | |
define("DAEMON_LOG", "/tmp/daemon-sample/logfile"); | |
// uid and gid from http|www-data user |
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 | |
SRC_DIR=${1} | |
LOCALES_DIR=${2} | |
echo "Installing locales" | |
echo | |
while IFS= read -r -d $'\0' localeDir <&3; do | |
echo "Installing locales from '${localeDir}'..." |
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
import path from 'path' | |
import ExtractTextPlugin from 'extract-text-webpack-plugin' | |
const extractSass = new ExtractTextPlugin({ | |
filename: 'style/bundle.css', | |
disable: process.env.NODE_ENV === 'development' | |
}) | |
const rules = { | |
sass: { |
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
<?php | |
abstract class A | |
{ | |
public function inheritance() | |
{ | |
return self::p(); | |
} | |
public function inheritance2() |
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
[Unit] | |
Description=One shot server using netcat | |
After=network.target | |
[Service] | |
Type=simple | |
PIDFile=/run/one_shot_server.pid | |
Restart=on-failure | |
Environment="PORT=4000" | |
Environment="FILE=/tmp/somefile.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
storage: | |
dbPath: /var/lib/mongodb | |
repairPath: /var/lib/mongodb/.repair | |
directoryPerDB: true | |
journal: | |
enabled: true | |
engine: "mmapv1" | |
mmapv1: | |
smallFiles: true |
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 | |
OLDIFS=$IFS | |
IFS=$'\n' | |
mapfile -t NIC_MODEL < <(lspci | grep -i ethernet | sed 's@[[:alnum:]]\+:[[:alnum:]]\+\.[[:alnum:]]\+\s*@@' | uniq) | |
IFS=${OLDIFS} | |
for (( i=0; i < ${#NIC_MODEL[@]}; i++ )) | |
do |
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 | |
# This script should be used to download the most recent plugins for jenkins in command line | |
# You need Jenkins CLI (https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI) to use this script | |
JENKINS_CLI_JAR=/path/to/jenkins-cli.jar | |
JENKINS_PLUGIN_URL=http://updates.jenkins-ci.org/latest/ | |
JENKINS_PLUGIN_EXT=.hpi | |
JENKINS_PLUGIN_TMP=/tmp/jenkins/plugin | |
LIST_PLUGINS_CMD="java -jar ${JENKINS_CLI_JAR} -s http://localhost:8080/ list-plugins" |
NewerOlder