Skip to content

Instantly share code, notes, and snippets.

View fegoa89's full-sized avatar

Fernando González fegoa89

  • Almería, Spain
View GitHub Profile
@fegoa89
fegoa89 / format_duplicated_rows.py
Created May 12, 2015 10:26
Create a new CSV without duplicated rows in Python
# python -t format_duplicated_rows.py
with open('input.csv','r') as in_file, open('output.csv','w') as out_file:
seen = set()
for line in in_file:
if (line in seen):
continue
else:
seen.add(line)
out_file.write(line)
# ANSI color codes
RS="\[\033[0m\]" # reset
HC="\[\033[1m\]" # hicolor
UL="\[\033[4m\]" # underline
INV="\[\033[7m\]" # inverse background and foreground
FBLK="\[\033[30m\]" # foreground black
FRED="\[\033[31m\]" # foreground red
FGRN="\[\033[32m\]" # foreground green
FYEL="\[\033[33m\]" # foreground yellow
FBLE="\[\033[34m\]" # foreground blue
Control + Shift + e = split Horizontally
Control + Shift + o = split Vertically
Control + Shift + t = open new tab
Control + Shift + i = open new window
Control + Shift + w = close terminal
Control + Shift + q = close window
Control + Shift + g = reset and clear the terminal
Alt + any directional button = focus on terminal depending on direction
@fegoa89
fegoa89 / gist:6ae608450c5398ff9a41d604aa4835be
Created July 28, 2016 10:15
ubuntu resize cursor size
dconf write /org/gnome/desktop/interface/cursor-size 48
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
insert_final_newline = true
@fegoa89
fegoa89 / golangnotes.go
Created October 3, 2016 16:58
Some Golang notes
/////////////////////////////////////////////////////////////////////////////// Inheritance
package main
import "fmt"
type Vehicle struct {
wheelCount int
}
.
├── app
│ ├── app.js
│ ├── common
│ │ ├── controllers
│ │ ├── directives
│ │ ├── filters
│ │ └── services
│ ├── home
│ │ ├── controllers
{
"folders":
[
{
"path": "/home/fernando/code/<my-folder>",
"binary_file_patterns": ["*.min.js"],
"folder_exclude_patterns": ["node_modules", ".idea", "bower_components", "dist"]
}
]
}
@fegoa89
fegoa89 / angularjs-providers-explained.md
Created November 1, 2017 15:35 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.