Skip to content

Instantly share code, notes, and snippets.

@geralfonso
geralfonso / git_commits_count_since_tag.md
Created December 7, 2021 23:33
Git count commits since tag

For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:

First method (override Material UI classnames):

1 - Add the property classes in the AppBar component:

    <AppBar classes={{root: 'my-root-class'}}
@geralfonso
geralfonso / csv-to-json.js
Created February 16, 2019 02:00 — forked from iwek/csv-to-json.js
CSV to JSON Conversion in JavaScript
//var csv is the CSV file with headers
function csvJSON(csv){
var lines=csv.split("\n");
var result = [];
var headers=lines[0].split(",");
for(var i=1;i<lines.length;i++){
@geralfonso
geralfonso / csv2js.js
Created February 16, 2019 01:59 — forked from jonmaim/csv2js.js
Function takes a CSV (header + data) string as input and gives back a JS object.
// Start from https://gist.github.com/iwek/7154578#file-csv-to-json-js
// and fix the issue with double quoted values
function csvTojs(csv) {
var lines=csv.split("\n");
var result = [];
var headers = lines[0].split(",");
for(var i=1; i<lines.length; i++) {
var obj = {};
@geralfonso
geralfonso / xclip-copy-to-clipboard.md
Created October 15, 2018 20:58 — forked from Brainiarc7/xclip-copy-to-clipboard.md
Using xclip to copy terminal content to the clip board on Linux

Using xclip to copy terminal content to the clip board:

Say you want to pipe shell output to your clipboard on Linux. How would you do it? First, choose the clipboard destination, either the Mouse clip or the system clipboard.

For the mouse clipboard, pipe straight to xclip:

echo 123 | xclip

For the system clip board, pipe to xclip and select clip directly:

@geralfonso
geralfonso / style.css
Created August 21, 2018 18:47 — forked from traumverloren/style.css
VSCode Customizations for Operator Mono, Fira Code, and Dark Candy Theme
/*
Instructions for MacOS:
- Install the fonts 'Operator Mono' & 'Fira Code'
- Install theme 'Dark Candy'
- Add the following config to the VS Code settings.json:
{
"editor.renderWhitespace": "all",
"editor.fontSize": 14,
@geralfonso
geralfonso / tmux.conf
Created July 19, 2018 20:34 — forked from quinndiggity/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@geralfonso
geralfonso / README.md
Created April 11, 2018 17:52 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@geralfonso
geralfonso / gist:30e9e6630b4584e9d58d3954dc61fe68
Created December 15, 2017 04:46
/etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com