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 bash script to remove old versions of a Google App Engine instance. | |
# | |
# Inspiration of script taken from: | |
# https://almcc.me/blog/2017/05/04/removing-older-versions-on-google-app-engine/ | |
# Original code by Alastair McClelland and Marty Číž. | |
# Assembled and modified by Johan Niklasson. | |
# | |
# To run this script, execute |
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
function merge(obj1, obj2) { | |
var isAnyType = function(obj) { return (typeof obj !== "undefined" ); } | |
var isSingleType = function(obj) { return (typeof obj === "string" || typeof obj === "number"); } | |
var isObjectType = function(obj) { return (typeof obj === "object" && !isArrayType(obj)); } | |
var isArrayType = function(obj) { return Array.isArray(obj); } | |
if (isAnyType(obj1) && !isAnyType(obj2)) { | |
return obj1; | |
} |
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
cat <<EOF>~/.config/sublime-text-3/Packages/User/"Default (Linux).sublime-mousemap" | |
[ | |
// Change font size with ctrl+scroll wheel | |
{ "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" }, | |
{ "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" } | |
] | |
EOF |
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
# Script assembled by Johan Niklasson | |
# | |
# Author of the actual content | |
# Phil Hagen <[email protected]> | |
# Instructions from | |
# http://stuffphilwrites.com/2013/03/permanently-ban-repeat-offenders-fail2ban/ | |
# | |
# Run and install from web: | |
# wget -O - https://gist.githubusercontent.com/vonNiklasson/8568c2162c85c546f1b1faef726d5647/raw/ | bash |
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
# Change 4.10.0 to the appropriate version. | |
# This snippet is modified to work for 4.10.0 | |
# Taken from: | |
# https://bugs.freedesktop.org/show_bug.cgi?id=93578#c142 | |
sudo -i | |
apt-get install linux-source-4.10.0 | |
cd /usr/src | |
tar -jxf linux-source-4.10.0.tar.bz2 | |
cp -R ./linux-source-4.10.0/drivers/gpu/drm/i915 ./i915-usbc |
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
''' | |
translate.py | |
Management script for Django to easily run the | |
'makemessages'-command for all files in your Django application. | |
Put in any registered django app in the location | |
<app>/management/commands/translate.py | |
and then use | |
python manage.py translate | |
to run makemessages on all files in your project |