Skip to content

Instantly share code, notes, and snippets.

View ricardogaspar2's full-sized avatar

Ricardo Gaspar ricardogaspar2

View GitHub Profile
@kj-sh604
kj-sh604 / 11-elecom-deft-pro.conf
Last active August 10, 2024 18:59
personal Elecom Deft Pro Linux XF86/X11 configuration
### Elecom DEFT Pro Button Mappings: ###
# left-click(1) = left-click(1)
# middle-click(2) = middle-click(2)
# right-click(3) = right-click(3)
# scroll-up(4) = scroll-up(4)
# scroll-down(5) = scroll-down(5)
# wheel-tilt-down(6) = wheel-tilt-down(6)
# wheel-tilt-up(7) = wheel-tilt-up(7)
# button-back(8) = button-back(8)
# button-forward(9) = button-forward(9)
#!/bin/bash
#
# MicroStack by Canonical - Helper Install Script
#
# This script installs the MicroStack snap and setups up the networking fix developed by Rodrigo Nascimento
#
# Original blog post available here: https://connection.rnascimento.com/2021/03/08/openstack-single-node-microstack/
#
# Note: Make sure you adjust the INTERFACE and IP_ADDRESS variables to your environment.
# If you make the IP_ADDRESS the same as your current address you won't lose connection.
@expelledboy
expelledboy / uninstall-nix-osx.sh
Last active November 26, 2023 15:53
Trying Nix
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@jnovack
jnovack / alfred-4-open-iterm.applescript
Created May 31, 2019 11:14
Alfred 4 Custom Terminal Applescript to Open iTerm
-- Alfred 4 Custom Terminal Script for iTerm
-- To Install, copy to: Alfred --> Features --> Terminal --> Custom
on alfred_script(q)
if application "iTerm2" is running or application "iTerm" is running then
run script "
on run {q}
tell application \"iTerm\"
activate
try
@elalemanyo
elalemanyo / README.md
Last active September 20, 2024 08:39
Debug zsh startup time

Debug zsh startup time

  1. Inject profiling code

    At the beginning of your .zshrc add following: zmodload zsh/zprof

    and at the end add: zprof

    This will load zprof mod and display what your shell was doing durung your initialization.

@juanpampliega
juanpampliega / gist:f7b68c3546d921154ac9eaabf06a8911
Created June 2, 2018 21:46
Install OpenX Hive JSON SerDe in Amazon EMR to use it with Presto
# Do this on every node of the cluster
curl -O http://www.congiu.net/hive-json-serde/1.3.8/hdp23/json-serde-1.3.8-jar-with-dependencies.jar
sudo cp json-serde-1.3.8-jar-with-dependencies.jar /usr/lib/presto/plugin/hive-hadoop2/
sudo chown presto:presto /usr/lib/presto/plugin/hive-hadoop2/json-serde-1.3.8-jar-with-dependencies.jar
#restart presto
sudo restart presto-server
@ido-ran
ido-ran / build.gradle
Created January 24, 2018 13:28
Gradle script migrated from Maven assembly plugin
configurations {
deploymentZip
}
/**
* deployment-conf simply package the files in `content` directory in zip file.
* That zip file is later consumed by other module to build the installers.
*/
task packageZip(type: Zip) {
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@seangtkelley
seangtkelley / gitkraken-install.sh
Last active October 3, 2019 15:49 — forked from aelkz/[FEDORA] gitkraken
Install Script for Gitkraken on Fedora 27 + Launcher Icon
#!/bin/bash
# Enter /opt folder (common folder for user installed programs)
# This script assumes you have proper permissions on /opt
cd /opt
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken into /opt directory
@rueycheng
rueycheng / GNU-Make.md
Last active July 6, 2024 14:14
GNU Make cheatsheet