/app
├── /Application
| ├── /Exceptions
| ├── /Middlewares
| ├── /Providers
| ├── /Requests
├── /Domain
| ├── /MyDomainA
| | ├── /Contracts
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
| #!/bin/bash | |
| file=$1 | |
| aws_path="/" | |
| bucket='elblox-media' | |
| date=$(date +"%a, %d %b %Y %T %z") | |
| acl="x-amz-acl:public-read" | |
| content_type='application/x-compressed-tar' | |
| string="PUT\n\n$content_type\n$date\n$acl\n/$bucket$aws_path$file" |
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
| # +----------------------------+ | |
| # | IDE files | | |
| # +----------------------------+ | |
| /.idea | |
| # +----------------------------+ | |
| # | Vagrant | | |
| # +----------------------------+ | |
| /.vagrant |
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
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
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
| DELIMITER | | |
| DROP TRIGGER IF EXISTS `vote_update` | | |
| CREATE TRIGGER `vote_update` | |
| AFTER INSERT ON `votes` | |
| FOR EACH ROW | |
| BEGIN | |
| SET @row_day = CONCAT(DAYNAME(NOW()), '_votes'); |
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
| define ddl | |
| set $log = ngx_cycle->log | |
| while ($log != 0) && ($log->writer != ngx_log_memory_writer) | |
| set $log = $log->next | |
| end | |
| if ($log->wdata != 0) | |
| set $buf = (ngx_log_memory_buf_t *) $log->wdata | |
| dump memory debug_log.txt $buf->start $buf->end |
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
| LOADING=false | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 [options] dbname | |
| OPTIONS: | |
| -h Show this help. | |
| -l Load instead of export |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Looking At Underscore.js Templates</title> | |
| </head> | |
| <body> | |
| <h1> | |
| Looking At Underscore.js Templates |
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
| // ReflectionToStringBuilder wraps a class and outputs a string describing | |
| // its attributes, more or less similar to var_dump in PHP | |
| import org.apache.commons.lang.builder.ReflectionToStringBuilder | |
| variable= new ComplexObject() | |
| println new ReflectionToStringBuilder( variable).toString() |
In order to configure the bitbucket hook we need two things: The user's API Token and the project token. In order to retrieve the first one whe should click on our username (on the top right corner of the page), click on configure and then click on "Show API Token". This API token will be used as password for our user.
For the project's token we need to go to the job configuration (/job/{job-name}/configure), "build triggers" and enable "trigger remote builds" and, there, input some random text as token.
Once we have these two tokens we can go to bitbucket, repo administration, hooks section, and add a new jenkins hook that we will configure like:
- Endpoint: http://{username}:{APIToken}@{hostname}/{prefix_if_you_have_one}
- Module name: Whatever (I usually leave this one blank)
- Project name: The job name
- Token: The project token
NewerOlder