Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🌱 🌳 🌲

Janice jks8787

💭
🌱 🌳 🌲
View GitHub Profile
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active Aug 6, 2020
A Gentle Introduction to Prepack, Part 1
View prepack-gentle-intro-1.md

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active Aug 5, 2020
Difference between Shallow, Mount and render of Enzyme
View enzyme_render_diffs.md

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@praveenperera
praveenperera / webpack.config.babel.js
Last active Jun 13, 2019
Webpack 2.0 for Phoenix (Elixir) working with sass (scss), Image files, CSS, Font Files and jQuery
View webpack.config.babel.js
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
const extractSass = new ExtractTextPlugin({
filename: "css/app.css"
});
export default {
@randallreedjr
randallreedjr / heroku-remote.md
Last active Aug 8, 2020
Add a Heroku remote to an existing git repo
View heroku-remote.md

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@taiansu
taiansu / app.js
Created Aug 10, 2016
Phoenix brunch config which just make sense
View app.js
import "phoenix_html"
import "bootstrap"
import "jquery"
import "toastr"
// ...
@graceavery
graceavery / harryPotterAliases
Last active May 20, 2020
bash aliases for Harry Potter enthusiasts
View harryPotterAliases
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
@scrogson
scrogson / README
Last active Mar 13, 2020 — forked from ciastek/README
Use bootstrap-sass npm package with Phoenix's brunch
View README
1) install npm packages
2) update brunch-config.js
3) remove Bootstrap from web/static/css/app.css
4) rename web/static/css/app.css to web/static/css/app.scss
5) update web/static/css/app.scss
@chbrown
chbrown / _upgrade-pg9.4-to-pg9.5.md
Last active Dec 11, 2018
Upgrade PostgreSQL 9.4 to 9.5 on Mac OS X with Homebrew
View _upgrade-pg9.4-to-pg9.5.md

First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml lower down in this gist):

cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Most importantly, note the -D /usr/local/var/postgres argument.

Second, shut down your current PostgreSQL.

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
View AddTravel.js
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@chroth7
chroth7 / reactD3rescources.md
Last active Dec 6, 2017
React/D3 Resources
View reactD3rescources.md

React <-> D3 Resources

Thanks for all the stars.

Due to unexpected demand, I move this to a proper github repo, see here: https://github.com/chroth7/reactD3resources

I would very much like to get your PRs there, thank you!

You can’t perform that action at this time.