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 | |
# /etc/init.d/btsync | |
# | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
/etc/btsync/btsync --config /etc/btsync/sync.conf | |
;; | |
stop) |
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 | |
NODE=/usr/bin/nodejs | |
SERVER_JS_FILE=/scripts/server.js | |
USER=username | |
OUT=/var/log/nodejs.log | |
case "$1" in | |
start) |
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
auto eth0 | |
iface eth0 inet static | |
address 10.10.10.10 | |
netmask 255.255.255.0 | |
gateway 10.10.10.1 | |
dns-nameservers 8.8.8.8 8.8.4.4 | |
dns-search domain.com |
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
# Add to ~/.bashrc, ~/.profile, or similar | |
# Usage: | |
# $gh nano | |
# Returns: | |
# 50 nano .bashrc | |
function gh { history | grep $1; } |
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
<Window x:Class="_0message.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid> | |
<TextBox HorizontalAlignment="Left" Margin="12,266,0,0" Name="tbSendMessageText" VerticalAlignment="Top" Width="392" Height="auto" AcceptsReturn="False" Text="{Binding SendText, Mode=TwoWay}" /> | |
<TextBlock Height="248" HorizontalAlignment="Left" Margin="12,12,0,0" Name="tbReceiveMessage" VerticalAlignment="Top" Width="479" Text="{Binding ReceivedText, Mode=TwoWay}" /> | |
<Button Content="Send" Height="23" HorizontalAlignment="Left" Margin="416,266,0,0" Name="bSend" VerticalAlignment="Top" Width="75" Command="{Binding Send}" /> | |
</Grid> |
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
import argparse | |
argparser = argparse.ArgumentParser(description='Arguments that may be parsed.',epilog="The Epilog") | |
argparser.add_argument('--test',action='store_true',help='Simulate the Run') | |
argparser.add_argument('--dir','-d',type=str,required=True,help='Required variable "dir" with the following text as its value. i.e. --dir /test/123/ ') | |
argparser.add_argument('--optionaldefault','-o',default="the default value",type=str,help='Creates a variable "optionaldefault" ') | |
argparser.add_argument('--integer','-i',default=0,type=int,help='Creates a variable "integer" with the value 0 if nothing is specified.') | |
args = argparser.parse_args() | |
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 | |
if ps -ef | grep -v grep | grep program.sh ; then | |
exit 0 | |
else | |
~/scripts/program.sh >> /dev/null & | |
echo "Restarting program.sh, it was not running." | wall | |
exit 0 | |
fi |
NewerOlder