Skip to content

Instantly share code, notes, and snippets.

View fernando-nog's full-sized avatar
🏠
Working from home

Fernando Nogueira fernando-nog

🏠
Working from home
View GitHub Profile
@tomsihap
tomsihap / gist:e703b9b063ecc101f5a4fc0b01a514c9
Created December 23, 2018 14:46
Install NVM in Ubuntu 18.04 with ZSH
# Find the latest version on https://github.com/creationix/nvm#install-script
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
$ source ~/.zshrc
@dfontana
dfontana / CmderZSH.md
Last active March 12, 2023 21:45
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
@sowe
sowe / pentaho_backup.sh
Last active November 14, 2019 11:13
shell scrtip for backup and restore pentaho system
#!/bin/bash
# Maintain for @sowe Rafael Valenzuela <ravamo@gmail.com>
# redcloverbi.wordpress.com for more information
# basic backup and restore script for pentaho in Production enviroment doc
# https://help.pentaho.com/Documentation/6.1/0P0/000/020
# https://help.pentaho.com/Documentation/6.1/0P0/000/Backup_and_Restore_Pentaho_Repositories
set -e
set -u
@ansgarschulte
ansgarschulte / Visual Studio Code eclipse Shortcuts Mac
Created November 30, 2015 09:21
Visual Studio Code eclipse Shortcuts Mac
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "cmd+shift+r", "command": "workbench.action.quickOpen" },
{ "key": "cmd+shift+f", "command": "editor.action.format", "when": "editorTextFocus" },
{ "key": "alt+cmd+down", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" },
{ "key": "alt+cmd+up", "command": "editor.action.copyLinesUpAction", "when": "editorTextFocus" },
{ "key": "alt+down", "command": "editor.action.moveLinesDownAction", "when": "editorTextFocus" },
{ "key": "alt+up", "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus" },
{ "key": "cmd+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" },
{ "key": "alt+cmd+r", "command": "editor.action.rename", "when": "editorTextFocus" },
@staltz
staltz / introrx.md
Last active July 6, 2024 08:47
The introduction to Reactive Programming you've been missing
@dr-dimitru
dr-dimitru / mount_ram_disk.sh
Created December 1, 2013 03:39
Create RAM Disk (Mac OS X) via Terminal
diskutil erasevolume HFS+ "diskname" `hdiutil attach -nomount ram://2048`
#The line above mounts disk with name "diskname" and with size of 2048 blocks (~1 MB)
#More info: http://osxdaily.com/2007/03/23/create-a-ram-disk-in-mac-os-x/
#Convert blocks to megabytes and vise versa - http://www.unitconversion.org/data-storage/blocks-to-megabytes-conversion.html
#Note: Disk will be unmounted and all data will be lost on: empty battery, system reboot.
#How to save data on RAM disk on reboot, sleep or empty battery: http://puregin.org/setting-up-a-persistent-ramdisk-on-MacOS
@prule
prule / gist:5523826
Created May 6, 2013 07:37
Spring application context showing how to reference JNDI resources exposed by a container
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd">
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 5, 2024 04:29
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'