Skip to content

Instantly share code, notes, and snippets.

Avatar

Gustavo Vargas xgvargas

View GitHub Profile
@xgvargas
xgvargas / kicad.md
Last active Aug 18, 2019
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 Jul 27, 2019
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 Apr 25, 2019
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 Apr 12, 2019
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 Aug 13, 2019
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 Mar 13, 2016
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 Jun 25, 2018
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/