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 | |
echo "Backup script is running" | |
PG_DOCKER_CONTAINER="postgres" | |
PG_USERNAME="postgres" | |
DATABASE="default_database" | |
HOMEPATH=$(cd ~ && pwd) | |
COLOR_NORMAL="\033[0m" |
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
# Attach iOS device to Mac and create virtual network | |
# Use real iOS UUID instead placeholder | |
# It is possible to get UUID with iTunes: just click on `Serial number` field | |
rvictl -s UUID | |
# Returns `Starting device UUID [SUCCEEDED] with interface rviX` | |
# Start dumping traffic | |
# Use real name of virtual network instead `rviX` | |
# To stop use `ctrl + C` | |
sudo tcpdump -i rviX -w ~/ios.pcap |
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
psql -c "SELECT *, pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'DATABASE_NAME'" |
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
function getUrlParameter(sParam){var sPageURL = window.location.search.substring(1);var sURLVariables = sPageURL.split('&');for (var i = 0; i < sURLVariables.length; i++) {var sParameterName = sURLVariables[i].split('=');if (sParameterName[0] == sParam) {return sParameterName[1];}}} | |
var site_url = ''; | |
var message = ''; | |
var $onPageItems = jQuery('#ires .g:not(#imagebox_bigimages)'); | |
var start = getUrlParameter('start'); | |
if (!start) { | |
start = 0; | |
} else { | |
start = parseInt(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
// Part of pager_all.module Drupal 7 | |
/** | |
* Implements hook_custom_theme(). | |
*/ | |
function pager_all_theme() { | |
return array( | |
'pager_all' => array( | |
'variables' => array(), | |
) |
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
mysql -u DB_USER_NAME -p DB_USER_PSWD -Nse 'show tables' DATABASE_NAME | while read table; do mysql -u DB_USER_NAME -p DB_USER_PSWD -e "drop table $table" DATABASE_NAME; done |