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=netdata | |
After=network.target httpd.service squid.service nfs-server.service mysqld.service named.service postfix.service | |
[Service] | |
Type=forking | |
WorkingDirectory=/tmp | |
User=root | |
Group=root | |
PIDFile=/var/run/netdata/netdata.pid |
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
## Scan for new disks | |
for host in $(ls /sys/class/scsi_host/); do echo "- - -" > /sys/class/scsi_host/$host/scan; done | |
## scan for disk changes | |
for scsi in $(ls /sys/class/scsi_disk/); do echo "1" > /sys/class/scsi_disk/$scsi/device/rescan; done |
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 | |
base=$1; | |
if [ -z "$base" ]; then | |
echo "Need input dir" | |
exit | |
fi |
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
@echo off | |
echo "Press enter to start, THIS WILL REMOVE ALL EXTENSIONS FROM CHROME" | |
pause | |
echo "Killing all Chrome processes" | |
taskkill -F -T -im "chrome.exe" | |
echo "Going into %LOCALAPPDATA%/Google/chrome/User Data/Default/Extensions" | |
cd "%LOCALAPPDATA%/Google/chrome/User Data/Default/Extensions" |
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 | |
# Sækja stress | |
# | |
# yum localinstall ftp://fr2.rpmfind.net/linux/dag/redhat/el7/en/x86_64/dag/RPMS/stress-1.0.2-1.el7.rf.x86_64.rpm | |
# | |
# eða | |
# wget ftp://fr2.rpmfind.net/linux/dag/redhat/el7/en/x86_64/dag/RPMS/stress-1.0.2-1.el7.rf.x86_64.rpm | |
# yum localinstall stress-1.0.2-1.el7.rf.x86_64.rpm |
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 | |
domain=$1 | |
dns=$(dig $domain ns +noall +additional | grep "IN" -A 100 | awk '{print $1}') | |
stop= |
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
'use strict' | |
const fs = require('fs'); | |
const yaml = require('js-yaml'); | |
const EventEmitter = require('events'); | |
const ev = new EventEmitter(); | |
var configLoader = function (configfile, callback){ |
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/bash | |
# OpenSSL requires the port number. | |
HOST=$1 | |
PORT=$2 | |
if [ -z "$PORT" ]; then | |
PORT="443" | |
fi |
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
/* | |
<div class="foobar" id="torender"> | |
<div class="adf"> | |
<h4>{{name}} the {{job.title}} like {{hobby}}</h4> | |
</div> | |
</div> | |
*/ |
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 | |
a=`date --date "$(uptime -s)" '+%s'`; | |
b=$(date '+%s'); | |
echo "$b - $a" | bc |