For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Title</title> | |
<link rel="stylesheet" href="style.css"/> | |
<style></style> | |
<script src="script.js"></script> |
def simple_nested_set(clazz) # Post for example | |
stack = [] # Post for example | |
result = [] | |
clazz.all(:order => "lft").each do |node| | |
if stack.empty? | |
stack.push({:node => node, :children => []}) | |
result << stack.last | |
next | |
end | |
if stack.last[:node].lft < node.lft && node.lft < stack.last[:node].rgt |
class Alert < ActiveRecord::Base | |
belongs_to :alertable, :polymorphic => true | |
end | |
class Region < ActiveRecord::Base | |
has_many :alerts, :as => :alertable | |
end | |
# to execute this gist, run the line bellow in terminal | |
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh |
<?php | |
/** | |
* Installer script | |
* | |
* @category Solvingmagento | |
* @package Solvingmagento_Samples | |
* @author Oleg Ishenko <oleg.ishenko@solvingmagento.com> | |
* @copyright Copyright (c) 2012 - 2013 Oleg Ishenko | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
* @version GIT: <0.1.0> |
<?php | |
/** | |
* Created by PhpStorm. | |
* User: danvbe | |
* Date: 7/25/14 | |
* Time: 2:49 PM | |
*/ | |
namespace Application\Sonata\PaymentBundle\Component; |
redux-optimist usage
import optimist from 'redux-optimist';
import { combineReducers } from 'redux';
import todos from './todos';
export default optimist(combineReducers({
todos
}));
#!/bin/bash | |
wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb | |
apt install ./ttf-mscorefonts-installer_3.6_all.deb |
I decided to remove all Immutable code on our big project because it wasn't causing our React to render less (using selectors on our redux layer was actually better).
Since our project has tests to check if everything is still working, I was able to achieve that with the following steps:
Search on all files on vscode or any editor with Use Regular Expression
option (command+alt+r on vscode):
(Immutable|\.(size|count\(|toJS(?!\w)|fromJS(?!\w)|first[\(\)]|get\(|set\(|findEntry\(|getIn\(|setIn\(|contains\(|delete\(|asImmutable|add\())
Then on each find that was actually from a Immutable code: