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 | |
| # | |
| set -e | |
| # | |
| export YES="Yes" | |
| export NO="No" | |
| export WAIT=2 | |
| # | |
| export NAME_MASTER="salt_mstr" | |
| export ID_MINION="$(hostname)" |
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 | |
| # -- | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| # | |
| mkdir -p ~/tmpxxxxxtmp | |
| pushd ~/tmpxxxxxtmp | |
| apt-get install curl |
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/python | |
| # -*- coding: utf-8 -*- | |
| # | |
| ''' | |
| This script will attempt to open your web browser, | |
| perform OAuth 2 authentication and print out your full set | |
| of OAuth credentials in the form of Python variable declarations. | |
| It depends on Google's Python library: oauth2client. |
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 | |
| AUTH=$(curl -s https://www.google.com/accounts/ClientLogin --data-urlencode Email=$1 --data-urlencode Passwd=$2 -d accountType=GOOGLE -d service=wise | grep -Po '(?<=Auth=)[^;]+') | |
| curl -o temp.html --silent --header "Authorization: GoogleLogin auth=$AUTH" "https://docs.google.com/feeds/download/spreadsheets/Export?exportFormat=html&key=$3&gid=$4" | |
| cat temp.html | |
| echo | |
| echo Google ID is : $1 | |
| echo Google password is : $2 | |
| echo Google spreadsheets workbook key is : $3 | |
| echo Sheet id number is : $4 |
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
| sudo apt-get install tlsdate | |
| sudo tlsdate -H mail.google.com | |
| # sudo ntpdate -sb time.nist.gov | |
| sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y clean && sudo apt-get -y autoremove; | |
| # # Update to head of list |
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
| Usage : | |
| wget -N https://gist.github.com/martinhbramwell/6188800/raw/f17fdc1ad7f3217059bfe963db175e34a5ded21f/downgrade_firefox.sh | |
| chmod a+x downgrade_firefox.sh | |
| sudo ./downgrade_firefox.sh | |
| # drag the desktop icon to the launcher | |
| # click on it | |
| # you should be back in action |
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 | |
| # | |
| apt-get -y update | |
| apt-get -y upgrade | |
| apt-get -y remove --purge libreoffice* | |
| apt-get -y install myunity | |
| apt-get -y install python-dev # Urgent for Flask build |
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/python | |
| import shutil | |
| import sys | |
| import os | |
| def getparent (content, line_nr): | |
| for i in range (line_nr - 1, -1, -1): | |
| if "{" in content[i].lstrip(): | |
| return content[i].lstrip().split(" ")[0] |
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
| --- orm.py 2013-04-23 08:51:16.221986798 -0400 | |
| +++ orm.py 2013-04-23 07:23:08.049987030 -0400 | |
| @@ -1144,17 +1144,20 @@ | |
| elif f[i] == 'id': | |
| r = _get_xml_id(self, cr, uid, r) | |
| else: | |
| - r = r[f[i]] | |
| - # To display external name of selection field when its exported | |
| - if f[i] in self._columns.keys(): | |
| - cols = self._columns[f[i]] |
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 | |
| # | |
| DROP_ROWCOUNTS="\"DROP TABLE IF EXISTS rowcounts;\"" | |
| MAKE_ROWCOUNTS="\"CREATE TABLE rowcounts | |
| ( | |
| name_server character varying(64) NOT NULL | |
| , name_table character varying(64) NOT NULL | |
| , count integer | |
| );\"" | |
| # |