Skip to content

Instantly share code, notes, and snippets.

View thiagodebastos's full-sized avatar
:electron:
Contracting, Consulting, Learning

Thiago de Bastos thiagodebastos

:electron:
Contracting, Consulting, Learning
View GitHub Profile
@CMCDragonkai
CMCDragonkai / job_control_zsh_bash.md
Last active January 28, 2024 00:45
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@runspired
runspired / .bash_profile
Last active February 6, 2023 14:56
Make Alfred / Spotlight ignore node_modules and bower_components
alias nom='npm cache clean && rm -rf node_modules && mkdir node_modules && touch node_modules/.metadata_never_index && npm install'
alias bom='bower cache clean && rm -rf bower_components && mkdir bower_components && touch bower_components/.metadata_never_index && bower install'
@karlwestin
karlwestin / README.md
Last active April 22, 2019 08:07
Redux Stopwatch Example

Redux Stopwatch Example

Just an idea, to practice after reading about redux async actions and middleware

the important part is this function

let INTERVAL = 50
let runTimer = () => {
 return (dispatch, getState) => {
@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])) {
@HenrikJoreteg
HenrikJoreteg / README.md
Last active September 20, 2021 01:36
Minimalist routing in Redux

Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.

Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.

This also means that when doing server-side rendering of a redux app, you can just do:

var app = require('your/redux/app')
var React = require('react')

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
@m0n01d
m0n01d / Full Stack JavaScript.md
Last active September 30, 2021 00:22 — forked from royshouvik/Full Stack JavaScript.md
Learn Full Stack JavaScript Web Development for FREE using resources like YouTube, Udacity and NodeSchool
@nepsilon
nepsilon / using-auto-backup-vim.md
Last active February 24, 2022 15:21
Using auto backup with Vim — First published in fullweb.io issue #3

Using auto backup with Vim

Not using versioning on your configuration files and editing them with Vim? Use Vim’s backup option to automatically keep a copy of past versions:

To put in your ~/.vimrc:

"Turn on backup option
set backup
@grncdr
grncdr / data.csv
Created June 17, 2015 22:29
Demo of importing a CSV file into a Contentful space
first name last name age
Stephen Sugden 31
Tom Reznik 29
Justin Thomas 30
@bfcoder
bfcoder / Launch Canvas Starter Script
Created June 10, 2015 18:07
Apple Script Project Launcher
(choose from list {"Large", "Laptop"} with prompt "Which Screen Size?")
set screen_size to result as text
set window_group to "Common"
if (screen_size = "Large") then
set window_group to "Freightlink_large"
end if
if (screen_size = "Laptop") then