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
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */ | |
###### small-numbers table | |
DROP TABLE IF EXISTS numbers_small; | |
CREATE TABLE numbers_small (number INT); | |
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); | |
###### main numbers table | |
DROP TABLE IF EXISTS numbers; | |
CREATE TABLE numbers (number BIGINT); |
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
LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
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
<?php | |
/** | |
* Translates a number to a short alhanumeric version | |
* | |
* Translated any number up to 9007199254740992 | |
* to a shorter version in letters e.g.: | |
* 9007199254740989 --> PpQXn7COf | |
* | |
* specifiying the second argument true, it will | |
* translate back e.g.: |
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
# Thanks to this post: | |
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x | |
$ brew install cabextract | |
$ cd ~/Downloads | |
$ mkdir consolas | |
$ cd consolas | |
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe | |
$ cabextract PowerPointViewer.exe | |
$ cabextract ppviewer.cab |
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
/** | |
* The following permission policy will allow an SNS topic to send messages to an SQS queue. Note that | |
* the value of "aws:SourceArn" can contain wildcards, so you could allow all topics in your account | |
* access to the queue, or topics that share a prefix (for example). | |
* | |
* Add this policy by clicking "Edit Policy Document" in the "Permissions" tab when viewing a queue | |
* in the AWS management console. | |
*/ | |
{ |
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
"" | |
"" Janus setup | |
"" | |
" Define paths | |
let g:janus_path = escape(fnamemodify(resolve(expand("<sfile>:p")), ":h"), ' ') | |
let g:janus_vim_path = escape(fnamemodify(resolve(expand("<sfile>:p" . "vim")), ":h"), ' ') | |
let g:janus_custom_path = expand("~/.vim/janus") | |
" Source janus's core |
I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.
UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess
policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.
This works for me with CircleCI and EB Cli.
{
"Version": "2012-10-17",
"Statement": [
{
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
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
OlderNewer