- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
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 | |
# | |
# template script for generating CentOS container for LXC | |
# | |
# | |
# lxc: linux Container library | |
# Authors: |
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
# Put expressions that hit more files first. | |
/home/chroot/.* | |
/home/[^/]+/Workspaces?/.*/target/.* | |
/home/[^/]+/Workspaces?/.*/\.pants\.d.* | |
/home/[^/]+/\.m2/repository/.* | |
/home/[^/]+/\.ivy2/(?:cache|local|limiter)/.* | |
/home/[^/]+/.*(?:~|\.(?:log|tmp|bak|lock)) | |
/home/[^/]+/S3/.* | |
/home/[^/]+/Virtualization/Machines/.* |
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
# Change Java Runtime: | |
sudo update-alternatives --config java | |
# Delete Open-JDK | |
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
# Change fonts - remove hinting: | |
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
# Change RubyMine AntiAliasing first: |
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
***** 308-hardened.patch ***** | |
PWD: /var/tmp/portage/app-emulation/vmware-modules-308.0-r1/work | |
PATCH TOOL: patch -> /usr/bin/patch | |
VERSION INFO: | |
GNU patch 2.7.5 | |
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. | |
Copyright (C) 1988 Larry Wall | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. |
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
***** 304-hardened.patch ***** | |
PWD: /var/tmp/portage/app-emulation/vmware-modules-304.2/work | |
PATCH TOOL: patch -> /usr/bin/patch | |
VERSION INFO: | |
GNU patch 2.7.5 | |
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. | |
Copyright (C) 1988 Larry Wall | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. |
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/sh | |
# Typical location - /jffs/scripts/ddns-start | |
# NOTE - USERNAME and PASSWORD must be URL encoded, example @ becomes %40 | |
USERNAME=CHANGE_ME_URL_ENCODED | |
PASSWORD=CHANGE_ME_URL_ENCODED | |
HOSTNAME=all.dnsomatic.com | |
IP=`curl --silent http://canhazip.com` | |
# Should be no need to modify anything beyond this point | |
/usr/sbin/curl --silent "https://$USERNAME:$PASSWORD@updates.dnsomatic.com/nic/update?hostname=$HOSTNAME&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG&myip=$IP" > /dev/null |
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
/* How to calculate postgreSQL database size in disk ? */ | |
SELECT pg_size_pretty(pg_database_size('thedbname')); | |
/* Calculate size of a table including or excluding the index */ | |
SELECT pg_size_pretty(pg_total_relation_size('big_table')); | |
SELECT pg_size_pretty(pg_relation_size('big_table')); /* without index */ | |
/* See indexes on a table with `\d tablename` */ |
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 | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
version: "2" | |
services: | |
my-wpdb: |
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
module Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |
OlderNewer