Skip to content

Instantly share code, notes, and snippets.

View c33k's full-sized avatar
💭
“I move to keep things whole” - MS

Rafael L. Toscano c33k

💭
“I move to keep things whole” - MS
View GitHub Profile
@c33k
c33k / electron-in-react.md
Created March 20, 2021 16:22
ADD ELECTRON TO CREATE-REACT-APP

1 - After creating your project with create-react-app, run: yarn add --dev electron

2 - create src/electron-start.js file and add this:

const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
@c33k
c33k / gist:6ad932c8caf4e6c4db91a6dbdc3af6e1
Last active March 17, 2020 18:34
iterm2 + zsh + oh_my_zsh
# Here is a summary of many gists I've seen so far.
This https://gist.github.com/kevin-smets/8568070 was the most useful one.
brew cask install iterm2 // or downloading it...
brew install zsh
#install oh_my_zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@c33k
c33k / .eslintrc.json
Created August 10, 2018 07:57
ESLINT FOR REACT
{
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
"prettier"
],
"parserOptions": {
screen -S title //creates a new screen with given title
screen -list
screen -x title // goes to screen
ctrl+a d //dettach screen
ctrl+d //exit screen - doesn't show up on screen -list
ctrl+a c //creates new window
ctrl+a n or p //moves between windows
@c33k
c33k / Macbook Requirements
Created April 10, 2018 19:11
A list of things I need or is good for me to install in the mac to make it in the way I have it configured now.
homebrew
With homebrew, install rbenv to manipulate Ruby versions: https://github.com/rbenv/
# USEFOOL TOOLS
npm i -g browserify
npm i budo -g
npm i browser-run -g
#example:
browserify *.js > bundle.js
# BUDO - browserify your tests and run it in the browser, without the need for you to create a html do load a bundle.js,
# for example, generated by browserify
@c33k
c33k / gist:f0eb76be344129638f1fdae0839f109a
Created February 25, 2018 02:50
Shell script useful
/bin/ls -h | grep *.txt | sed s/\s_/\n/g | while read LINE; do echo -n "$LINE "; wc -l $LINE | awk '{print $1}'; done
@c33k
c33k / .vimrc
Last active March 18, 2020 09:02
"First, install: dein and NerdTree
if &compatible
set nocompatible
endif
" Add the dein installation directory into runtimepath
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.cache/dein')
call dein#begin('~/.cache/dein')
https://github.com/DefinitelyTyped/tsd/issues/269
//esse comando atualiza as antigas dependências/referêndias do TSD para o novo typings
typings init --upgrade
@c33k
c33k / using-swagger-with-node.md
Created September 21, 2016 20:00
Using swagger with swagger-jsdoc module in nodejs

npm install swagger-jdsoc --save-dev

FROM ANNOTATTION TO DOCS var swaggerJSDoc = require('swagger-jsdoc'); // swagger definition var swaggerDefinition = { info: { title: 'Node Swagger API', version: '1.0.0', description: 'Demonstrating how to describe a RESTful API with Swagger',