Skip to content

Instantly share code, notes, and snippets.

View mrbarbasa's full-sized avatar

Marifel Barbasa mrbarbasa

View GitHub Profile
@jaywon
jaywon / Dockerfile
Last active April 9, 2018 11:28
Files used in Docker demo here: https://youtu.be/MncPj2ZHnD0
FROM alpine:latest
COPY writer.sh .
CMD ["/writer.sh"]
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@sgnl
sgnl / add-upstream.md
Last active October 3, 2023 22:51
So you've forked a Repository and you want updates...

#tl;dr

setting up a branch to track a repo

pre: assuming you have forked a repo and cloned your fork to your computer

  1. git remote add [maintainer's name] [paste URL here]
  2. git fetch --all
  3. git branch --track [maintainer's name]_[branch] [remote name from step 1]/[branch you want to track] At this point you may watch to checkout to your newly create branch and issue a git pull command.
@theRemix
theRemix / LiveReload Notes.md
Created November 29, 2014 23:17
LiveReload Notes (gulp, sass, foundation, livereload, via express)

Starting up a project with /app/public for final output files AND using Foundation


In your project root

Copy over relevant assets into a ./Layouts directory.

Make this file to ignore installable components.
.gitignore

@theRemix
theRemix / Multidimensional Arrays.md
Last active August 29, 2015 14:08
Multidimensional Arrays

Multidimensional Arrays

Setup

  • create a project in your DevLeague directory named "MultiDimensional Arrays"
  • initialize a git repository in this project
  • create a .gitignore file and add node_modules as an ignored path
  • initialize an npm project named "MultiDimensional Arrays"
  • install any dependencies you need to run tests with mocha and chai
  • create a subdirectory called test/
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@sgnl
sgnl / sublimelinter.develeague.md
Last active May 4, 2016 07:33
Adding the SublimeLinter and JSHint packages to your sublime text 3.
  1. Install/Verify you have Sublime Text 3 (http://sublimetext.com/3)

  2. Install/Verify that Package Control Module is installed to for Sublime Text: https://packagecontrol.io/installation

Linux: Click the Preferences > Browse Packages… menu
 Browse up a folder and then into the Installed Packages/ folder
 Download Package Control.sublime-package and copy it into the Installed Packages/ directory
 Restart Sublime Text

  • Open up Package Control in your sublime text. (cmd+shift+P)
    1. Type PC Install to make use of FuzzySearch to bring up Package Control: Install Package
  1. Hit the enter key
@ericallam
ericallam / gist:1019446
Created June 10, 2011 18:35
How to log all queries for a PostgreSQL homebrew install on OS X

Open the postgresql.conf config file:

$> mate /usr/local/var/postgres/postgresql.conf

Uncomment the line with 'log_destination' and set it to 'syslog'

log_destination = 'syslog'

Open the syslog config: