-
open /private/etc/apache2/httpd.conf file and enable module
uncomment: LoadModule php5_module libexec/apache2/libphp5.so
-
copy /private/etc/php.ini.default to /private/etc/php
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 noti = new apns.Notification(); | |
| var device = new apns.Device("DEVICE-TOKEN"); | |
| noti.sound = "notification.caf"; | |
| noti.alert = "Message here!!"; | |
| noti.payload = { }; //object with data if you want. | |
| noti.device = device; | |
| apnsConnection.sendNotification(noti); |
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
| $ openssl x509 -in aps_cert_development.cer -inform DER -outform PEM -out aps_cert_development.pem | |
| $ openssl x509 -in aps_cert_production.cer -inform DER -outform PEM -out aps_cert_production.pem | |
| $ openssl pkcs12 -in aps_key_development.p12 -out aps_key_development.pem -nodes | |
| $ openssl pkcs12 -in aps_key_production.p12 -out aps_key_production.pem -nodes |
$ curl http://pear.php.net/go-pear.phar > go-pear.php
$ sudo php -q go-pear.php
- Note: To install default configuration
- Edit .bash_profile (or .bashrc) and add:
export PATH=/Users/username/pear/bin:$PATH
$ source ~/.bash_profile
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
| ######################################## | |
| # | |
| # GIT | |
| # | |
| ######################################## | |
| # Mostrar commits que no se han pusheado: | |
| $ git log origin/branch..branch | |
| $ git log origin/master..HEAD |
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
| source 'https://rubygems.org' | |
| gem 'redcarpet', '1.17.2' | |
| gem 'guard', '~> 1.8.0' | |
| gem 'guard-haml', '~> 0.5' | |
| gem 'guard-sass', '~> 1.1.0' | |
| gem 'guard-coffeescript', '~> 1.3.0' | |
| gem 'guard-sprockets' | |
| gem 'guard-rocco' |
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
| guard 'sass', input: 'source/styles', output: 'Resources/styles' | |
| guard 'haml', input: 'source', output: 'Resources' do | |
| watch(/^.+(\.html\.haml)/) | |
| end | |
| guard 'rocco', :run_on => [:start, :change], :dir => 'docs', :stylesheet => 'https://raw.github.com/joeharris76/docco-css/master/nuvola.css' do | |
| watch(%r{^source/scripts/.*\.(coffee)$}) | |
| 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
| # String extensions | |
| class String | |
| def cavgsify | |
| gsub /ca([Z b-df-hj-np-tv-z]|[ ]|\Z)/, 'cavg\1' | |
| end | |
| def ochoafy | |
| gsub /a/, 'aaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaAaaaA' | |
| 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
| require 'mechanize' | |
| def parse_offer(link, goal) | |
| agent = Mechanize.new | |
| agent.get link | |
| salary = agent.page.search('[itemprop="baseSalary"]') | |
| salary_value = salary.first.attributes['content'].value | |
| dolars = salary_value.to_i | |
| title = agent.page.search('[itemprop="title"]').first.text | |
| return nil unless dolars >= goal |
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
| # To add this extra space to your instance you type: | |
| sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
| sudo /sbin/mkswap /var/swap.1 | |
| sudo /sbin/swapon /var/swap.1 | |
| # If you need more than 1024 then change that to something higher. | |
| # To enable it by default after reboot, add this line to /etc/fstab: |