'fix/' is the pattern git branch | grep 'fix/' | xargs git branch -D
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
import './login.styl'; | |
import Component from '../components/component.react'; | |
import React from 'react'; | |
import exposeRouter from '../components/exposerouter.react'; | |
import {focusInvalidField} from '../lib/validation'; | |
@exposeRouter | |
export default class Login extends Component { | |
static propTypes = { |
####Nginx Tutorial - Proxy to Express Application, Load Balancer, Static Cache Files
https://www.youtube.com/watch?v=FJrs0Ar9asY
####MySQL Setup as an auto starting service
http://dev.mysql.com/doc/mysql-macosx-excerpt/5.5/en/macosx-installation-launchd.html
Future stuff
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
Problem: | |
Slow response on complex query method orderByChild("key") | |
Inspection: | |
Check the websocket frames on Chrome DevTools. | |
If it is loading unnecessary data, it means that Firebase is doing the query on client side. (Yes, it's not in the documentation but it does that) | |
Solution: | |
Add indexing in Security rules |
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 solve weird android behaviors we need to manually implement Hardware back-button actions sometimes | |
// $ionicPlatform.registerBackButtonAction returns a deregister function | |
var deregisterFunction = $ionicPlatform.registerBackButtonAction(backButtonAction, 500); | |
// Example way of unbinding | |
if(something === false) { | |
deregisterFunction(); | |
} | |
// Or if registered for a particular view / page |
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
<?php | |
// Solution: http://php.net/manual/en/filesystem.configuration.php#ini.auto-detect-line-endings | |
ini_set("auto_detect_line_endings", true); | |
// In a Wordpress plugin | |
@ini_set("auto_detect_line_endings", true); | |
?> |
Rails
> URI.encode('http://localhost/asflm#aflskm?lkml=klm#lkml')
"http://localhost/asflm%23aflskm?lkml=klm%23lkml"
In Rails use Addressable::URI.escape directly to perform a great encoding taking care of all parts of url
> Addressable::URI.escape('http://local/as host/asflm#aflskm?lkml=kl m#lkml')