I hereby claim:
- I am argami on github.
- I am argami (https://keybase.io/argami) on keybase.
- I have a public key ASDBhlriQI0kaeuzUd9x-WdXxOMfPKlAtyzJzS8cyuiGiAo
To claim this, I am signing this object:
| measure_text: (text, font_size, font_family) -> | |
| canvas = document.createElement('canvas') | |
| ctx = window.canvas.getContext '2d' | |
| ctx.font = "#{font_size} #{font_family}" | |
| ctx.measureText(text).width |
| Installation instruction | |
| curl https://raw.github.com/gist/1272098/e0199b49a72121c5e24b19275e7d544529c9e688/openerp-install.sh -o | sh |
| require('should'); | |
| function a() { | |
| throw new Error("Oops"); | |
| return 1; | |
| } | |
| describe('MyLibrary', function(){ | |
| it('handles errors', function(){ | |
| a().should.equal(1); |
| Spree::BaseController.class_eval do | |
| before_filter :set_user_language | |
| def set_user_language | |
| I18n.locale = params[:locale] | |
| end | |
| end |
| rvm install ruby-1.8.7-p358 | |
| rvm use --create 1.8.7@xiki | |
| gem install bundler | |
| bundle | |
| gem build xiki.gemspec | |
| gem install xiki-0.5.0a.gem | |
| Output |
| upstream www.XXXXXXX.es { | |
| server XXX.XXX.XXX.XXX:3000; | |
| } | |
| server { | |
| listen 80; | |
| server_name www.XXXX.es XXXXX.es; | |
| location / { | |
| proxy_pass http://www.XXXXXXX.es; #this is the upstream option |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Include any branches for which you wish to disable this script | |
| if [ -z "$BRANCHES_TO_SKIP" ]; then | |
| BRANCHES_TO_SKIP=(master develop staging test) | |
| fi | |
| # Get the current branch name and check if it is excluded | |
| BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
| BRANCH_NAME_VALID_FORMAT=$(echo $BRANCH_NAME | grep -c -E "^\w{3,}-\d{3,}$") |
| -- In pg_stat_statements, there is a problem: sometimes (quite often), it registers the same query twice (or even more). | |
| -- It's easy to check in your DB: | |
| -- | |
| -- with heh as ( | |
| -- select userid, dbid, query, count(*), array_agg(queryid) queryids | |
| -- from pg_stat_statements group by 1, 2, 3 having count(*) > 1 | |
| -- ) select left(query, 85) || '...', userid, dbid, count, queryids from heh; | |
| -- | |
| -- This query gives you "full picture", aggregating stats for each query-database-username ternary |
| #!/bin/bash | |
| # install this in any folder in your path and execute it | |
| # by fire.sh in case of a real fire to save your data | |
| echo "Leave the building you fool i will handle it" | |
| # adding new branch to not polute the one beign used | |
| # and unique by user name | |
| git checkout -b fire_starting_$(whoami) |