Skip to content

Instantly share code, notes, and snippets.

View xgvargas's full-sized avatar

Gustavo Vargas xgvargas

View GitHub Profile
@xgvargas
xgvargas / gitcheck.sh
Last active April 4, 2023 01:21
List GIT status of all sub directories
View gitcheck.sh
#! /usr/bin/bash
if [ -t 1 ]; then
# executed in terminal
GREY='\e[1;30m'
RED='\e[1;31m'
GREEN='\e[1;32m'
YELLOW='\e[1;33m'
BLUE='\e[1;34m'
MARGENTA='\e[1;35m'
@xgvargas
xgvargas / kicad.md
Last active February 27, 2023 23:28
Install KiCAD
View kicad.md

If using UBUNTU

As explained here:

sudo add-apt-repository --yes ppa:kicad/kicad-6.0-releases
sudo apt update
sudo apt install --install-recommends kicad
@xgvargas
xgvargas / kicad.md
Last active August 18, 2019 02:56
Kicad configuration
View kicad.md

Kicad

.gitignore

*.bak
*.kicad_pcb-bak
*.sch-bak

# only include the cache and rescue libs
@xgvargas
xgvargas / nativescript.md
Last active July 27, 2019 19:55
Starting with Nativescript and seting up to use Coffeescript, Pug and Stylus
View nativescript.md

Nativescript

The standard version of Nativescript uses XML, JS and SCSS, no matter the selected framework.

In my case I like to use Pug, Coffeescript and Stylus with VueJS.

Bellow is the process to configure the CLI to use this combination:

# while nativescript uses NPM internally I like to use Yarn, so my global is installed with it.
View gitignore.md

gitignore

Kicad project

*.dcm
*.bak
*.kicad_pcb-bak

# only include the cache and rescue libs
@xgvargas
xgvargas / WSL.md
Created April 25, 2019 22:38
WSL installation process
View WSL.md

WSL

Enable WSL from PowerShell with Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux.

There are multiple way to download/install your distro. I'm lazy, so just go to Windows Store:

Use the GET button to download it. The actual installation will happen on first launch (so it will take some time). During the installation a user name will be requested, it can be anything (ie. do not need to be the same used on Windows).

@xgvargas
xgvargas / cyclic.md
Created April 12, 2019 22:06
Method to discover the property with cyclic reference
View cyclic.md

This is just a copy of this stackoverflow answer.

Simply copy this into browser console and call it with the issued object.

function isCyclic(obj) {
  var keys = [];
  var stack = [];
  var stackSet = new Set();
@xgvargas
xgvargas / autosubtitle.sh
Last active August 13, 2019 11:55
Bash script to download subtitles
View autosubtitle.sh
#!/bin/bash
agent="SubDB/1.0 (autoSubtitle/0.1; http://github.com)"
process_file_f() {
ffull="$1"
# fpath=${ffull%/*}
ffn=${ffull##*/}
@xgvargas
xgvargas / README.md
Last active March 13, 2016 02:38
Windows batch file association
View README.md

wicon

Generates two windows .reg file to install and uninstall a collection of associations for your prefered software.

Also, you can configure it to include:

  • create new file (for any file of your collection)
  • Open with... when right click a file
  • Open with... when right click a folder
  • Open with... when right click an empty area inside a opened folder.
@xgvargas
xgvargas / README.md
Last active June 25, 2018 09:01
Gulp -> Coffeescript, SCSS, Jade, SVG to PNG, array(SVG) to SVG
View README.md

Folder

You are supposed to have this project layout:

node_modules/
bower_components/
coffee/
jade/
scss/

svg/