| # sms.py | |
| # Sends sms message to any cell phone using gmail smtp gateway | |
| # Written by Alex Le | |
| import smtplib | |
| # Use sms gateway provided by mobile carrier: | |
| # at&t: number@mms.att.net | |
| # t-mobile: number@tmomail.net | |
| # verizon: number@vtext.com |
| #!/bin/bash | |
| OPENSSL_VERSION="1.0.1g" | |
| curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
| tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
| mv openssl-$OPENSSL_VERSION openssl_i386 | |
| tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
| mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
| cd openssl_i386 |
| import tropo | |
| coroutines = {} | |
| def prompt_text(self, prompt, number): | |
| """ | |
| initiate a conversation with <phone>, asking a prompt | |
| (merely pings the outbound session endpoint) | |
| """ |
| # United States Postal Service (USPS) abbreviations. | |
| abbreviations = [ | |
| # https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States#States. | |
| "AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "IA", | |
| "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", | |
| "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", | |
| "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", | |
| "WV", "WY", | |
| # https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States#Federal_district. | |
| "DC", |
| A warning occurred (42 apples) | |
| An error occurred |
| #!/bin/bash | |
| # | |
| # warning: this isn't pretty or good in anyway, but it worked for me... | |
| # | |
| ACCOUNT="LJ123456" | |
| # remember to URL encode the zip (%20 instead of space etc.) | |
| ZIP="123456" | |
| for u in `curl -vvv "http://download.linuxjournal.com/pdf/dljdownload.php?AN=${ACCOUNT}&ZP=${ZIP}" |grep a\ href | grep get\-doc | sed 's/^.*href\=\"//g' | sed 's/\".*$//g'` |
| #!/usr/bin/env bash | |
| # Runs a command wrapped in btrfs snapper pre-post snapshots. | |
| # Usage: $ snp <commands> | |
| # e.g.: $ snp pacman -Syyu | |
| # Requirements: snapper (https://wiki.archlinux.org/title/snapper) | |
| # The latest version of this script is hosted at https://gist.github.com/erikw/5229436 | |
| log_path="/var/local/log/snp" | |
| date=$(date "+%Y-%m-%d-%H%M%S") | |
| log_file="${log_path}/snp_${date}.log" |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| __author__ = "Adrien Pujol - http://www.crashdump.fr/" | |
| __copyright__ = "Copyright 2013, Adrien Pujol" | |
| __license__ = "Mozilla Public License" | |
| __version__ = "0.3" | |
| __email__ = "adrien.pujol@crashdump.fr" | |
| __status__ = "Development" | |
| __doc__ = "Check a TLS certificate validity." |
Add these lines to the end of /etc/sysctl.conf:
vm.swappiness=5
vm.min_free_kbytes=122880
vm.vfs_cache_pressure=500
Run these commands as root:
sudo sysctl -w vm.swappiness=5;
sudo sysctl -w vm.min_free_kbytes=122880