export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
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
| /* | |
| * fork.c | |
| * Experimental fork() on Windows. Requires NT 6 subsystem or | |
| * newer. | |
| * | |
| * Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org> | |
| * | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. |
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
| commands: | |
| 00_update_composer: | |
| command: export HOME=/root && export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
| option_settings: | |
| - namespace: aws:elasticbeanstalk:application:environment | |
| option_name: COMPOSER_HOME | |
| value: /root | |
| - namespace: aws:elasticbeanstalk:application:environment | |
| option_name: HOME |
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
| /** | |
| * Based on the mysql cluster | |
| * @link http://jonisalonen.com/2012/k-means-clustering-in-mysql/ | |
| */ | |
| -- SELECT | |
| -- * FROM | |
| -- unnest(kmeans(array(SELECT | |
| -- ( | |
| -- lat, |
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
| -- Create the raw events table | |
| CREATE TABLE page_views ( | |
| site_id int, | |
| path text, | |
| client_ip inet, | |
| view_time timestamptz default now(), | |
| view_id bigserial | |
| ); | |
| -- Allow fast lookups of ranges of sequence IDs |
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
| User Name: admin (Red Arrow) Password: 1234 (Blue Arrow) | |
| OR | |
| User Name: adminpldt (Red Arrow) Password: 1234567890 or 0123456789 (Blue Arrow) |
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
| -- cannot be a temporary view because other sessions must see it | |
| DROP VIEW IF EXISTS lockview CASCADE; | |
| CREATE VIEW lockview AS | |
| SELECT pid, virtualtransaction AS vxid, locktype AS lock_type, | |
| mode AS lock_mode, granted, | |
| CASE | |
| WHEN virtualxid IS NOT NULL AND transactionid IS NOT NULL | |
| THEN virtualxid || ' ' || transactionid | |
| WHEN virtualxid::text IS NOT NULL |
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
| http://sha256timestamp.ws.symantec.com/sha256/timestamp | |
| http://timestamp.globalsign.com/scripts/timstamp.dll | |
| https://timestamp.geotrust.com/tsa | |
| http://timestamp.verisign.com/scripts/timstamp.dll | |
| http://timestamp.comodoca.com/rfc3161 | |
| http://timestamp.wosign.com | |
| http://tsa.startssl.com/rfc3161 | |
| http://time.certum.pl | |
| http://timestamp.digicert.com | |
| https://freetsa.org |
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/local/env bash | |
| # Update system | |
| apt-get update && apt-get -y upgrade | |
| # Get build tools | |
| apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev | |
| # Define softether version | |
| RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) | |
| IFS='-' read -r -a RTMS <<< "${RTM}" |
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
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |