Skip to content

Instantly share code, notes, and snippets.

View samuelcastro's full-sized avatar
🏠
Working from home

Samuel Silva samuelcastro

🏠
Working from home
View GitHub Profile
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@gosukiwi
gosukiwi / .vimrc
Last active February 24, 2020 06:01
.vimrc
" ---------------------- USABILITY CONFIGURATION ----------------------
" Basic and pretty much needed settings to provide a solid base for
" source code editting
" don't make vim compatible with vi
set nocompatible
" turn on syntax highlighting
syntax on
" and show line numbers
@staltz
staltz / introrx.md
Last active July 25, 2024 16:52
The introduction to Reactive Programming you've been missing
// this code is safe to copy/paste into your browser
// but you should really try to write it out line-by-line ;)
// this gist is based on a number of other excellent introductions to lambda calculus
// classic: https://github.com/sjsyrek/presentations/blob/master/lambda-calculus/lambda.js
// ornithology: https://www.youtube.com/watch?v=3VQ382QG-y4&t=3349s
// and this one, in Ruby, called "Programming With Nothing" (excellent title) https://www.youtube.com/watch?v=VUhlNx_-wYk
pair = x => y => a => a(x)(y)
@leomelzer
leomelzer / Dockerfile
Last active March 9, 2022 19:18
Install private NPM dependencies using git+ssh on Now. Based on https://zeit.co/blog/build-env to work around missing support for git+ssh dependencies in now@2 (https://github.com/zeit/now-builders/issues/49)
# This is a multi-stage build to not spill the contents of the deploy_key
FROM mhart/alpine-node:10 as base
# We need git and openssh to resolve `git+ssh` links in package.json
RUN apk update \
&& apk add git openssh
WORKDIR /usr/src
COPY package*.json ./
@rpggio
rpggio / parseOrNull.ts
Last active April 4, 2024 04:34
React hook to persist MUI DataGrid column settings
/**
* If argument is a string, try to parse as JSON.
* Otherwise return null.
*/
export function parseOrNull(raw: unknown) {
if (!raw) return null
if (typeof raw === 'string') {
try {
return JSON.parse(raw)