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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <meta http-equiv="Content-Language" content="en-us" /> | |
| <title>/1340$front-end-performance</title> | |
| </head> | |
| <body><br | |
| /><ul><li>Front-end performance</li | |
| ><li>How to measure?<ul><li>HAR files<ul><li>HTTP archive</li |
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
| $form['chart_options']['plot']['plot_background_color'] = array( | |
| '#type' => 'textfield', | |
| '#title' => t('Page Title Color'), | |
| '#default_value' => '#FFF', | |
| '#description' => '<div id="plot_background_colorpicker"></div>', | |
| '#size' => 9, | |
| '#maxlength' => 7, | |
| '#attached' => array( | |
| // Add Farbtastic color picker. | |
| 'library' => array( |
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
| ogr2ogr -t_srs WGS84 -f "Mapinfo File" out.mif in.shp |
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
| # From http://stackoverflow.com/questions/5952939/htaccess-forward-local-to-remote-on-404 | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(sites/default/files/.*)$ http://productionurl.com/$1 [R,L,NC] |
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 | |
| [[ $1 ]] || { | |
| echo "Usage: fix-profile.sh [path to callgrind file]" | |
| exit 1 | |
| } | |
| egrep -v '^(cfl|positions|creator)' $1 | sed -e 's/^-//;1s/1/0.9.6/' > $1.fixed | |
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
| <useSecurity>true</useSecurity> | |
| <authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/> | |
| <securityRealm class="hudson.security.SecurityRealm$None"/> |
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
| cat big_list_of_commands.txt | tr '\n' '\0' | xargs -0 -n1 -P{thread-count} bash -c | |
| # or, per the example given: | |
| (for i in 1 2 3 4 5 6 7 8 9 10; do echo "echo 'Delay $i'; sleep $i ; echo 'Done $i'" ; done) | tr '\n' '\0' | xargs -0 -n1 -P4 bash -c |
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 | |
| # Save this file as 'convert' and point Drupal at it at /admin/config/media/image-toolkit | |
| [[ $1 == 'version' ]] && { | |
| gm $1 | |
| } || { | |
| gm convert $@ | |
| } |
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
| ## | |
| # Host Database | |
| # | |
| # localhost is used to configure the loopback interface | |
| # when the system is booting. Do not change this entry. | |
| ## | |
| 127.0.0.1 localhost | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| fe80::1%lo0 localhost |
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
| var jerk = require('jerk'), | |
| channel = ('SWEETDUDEBOT_CHANNEL' in process.env)? process.env.SWEETDUDEBOT_CHANNEL : '#yourchannel', | |
| options = { | |
| server: ('SWEETDUDEBOT_SERVER' in process.env)? process.env.SWEETDUDEBOT_SERVER : 'chat.freenode.net', | |
| nick: ('SWEETDUDEBOT_NICK' in process.env)? process.env.SWEETDUDEBOT_NICK : 'sweetdudebot', | |
| port: ('SWEETDUDEBOT_PORT' in process.env)? process.env.SWEETDUDEBOT_PORT : '6667', | |
| flood_protection: true, | |
| channels: [channel] | |
| }; |