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
# | |
# curl-code.conf | |
# | |
# Curl exit Codes | |
# | |
# https://curl.haxx.se/docs/manpage.html | |
# https://curl.haxx.se/libcurl/c/libcurl-errors.html | |
# | |
declare -a curl_code |
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
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 jose reis<jose.reis@artbit.pt> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 | |
# | |
# sudo wget -O /usr/local/bin/git.nigthly https://gist.githubusercontent.com/K-Ko/bd91fa6980819e749069f6714714a318/raw/git.nigthly | |
# sudo chmod 755 /usr/local/bin/git.nigthly | |
# | |
# set -x | |
[ -z "$1" ] && printf "\nUsage: $0 <repo directory> [<repo directory> ...]\n" && exit 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
#!/usr/bin/env python | |
# | |
# Shutdown script for Raspberry Pi | |
# | |
# Based on | |
# http://www.forum-raspberrypi.de/Thread-tutorial-hoch-und-runterfahren-mittels-taster-incl-status-led | |
# | |
# Watch LOW level on pin 5 to enter sleep mode | |
# Use power LED as status LED on pin 35: BLINK = confirm button | |
import os, time |
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 | |
# | |
# wget -q -O - https://gist.githubusercontent.com/K-Ko/30301a7bbb6c15b5bdda8aeeb512eb6c/raw/currant_pi_from_scratch.sh | bash | |
# | |
# Web server | |
sudo apt-get install lighttpd php-cgi -y | |
sudo lighttpd-enable-mod fastcgi fastcgi-php | |
sudo service lighttpd force-reload | |
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 | |
### | |
### sudo wget -qO /usr/local/bin/dynmotd https://gist.github.com/K-Ko/7eb8d2e8abdf36195efe6e1d814907b9/raw/dynmotd | |
### sudo chmod +x /usr/local/bin/dynmotd | |
### echo /usr/local/bin/dynmotd >> ~/.profile | |
### | |
echo | |
uname -srvm | |
echo |
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 | |
### | |
### sudo wget -qO /usr/local/bin/sysup https://gist.github.com/K-Ko/f247facdc73392e3c736a2e09d3136ed/raw/sysup | |
### sudo chmod +x /usr/local/bin/sysup | |
### | |
e () { | |
echo "::: ----------------------------------------------------------------------" | |
echo "::: $@" | |
} |
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 python | |
# http://raspberrypi.stackexchange.com/a/36245 | |
import sys, getopt, datetime, time, signal | |
import RPi.GPIO as GPIO | |
try: | |
from urllib.request import Request, urlopen # Python 3 | |
except: |
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/python | |
# sudo apt-get install python-apt | |
# sudo mkdir -p /usr/lib/update-notifier | |
# sudo wget -qO /usr/lib/update-notifier/apt-check https://gist.githubusercontent.com/K-Ko/3bf63ce8fb55a8add54db570fd6b600c/raw/apt_check.py | |
# sudo chmod +x /usr/lib/update-notifier/apt-check | |
# /usr/lib/update-notifier/apt-check --human-readable | |
# nice apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst |
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 | |
### Set pathe to Adminer document root | |
path=/var/www/html/adminer/public_html | |
### Fetch latest Adminer for MySQL only | |
wget -qO $path/.new http://www.adminer.org/latest-mysql.php | |
### Check if the download was successful and move the just downloaded file to its correct name | |
### (sometimes the downlaoded file is empty, I think it happens on timeouts) |