Skip to content

Instantly share code, notes, and snippets.

# rsync over ssh (entire dirs)
rsync -a ~/dir1 username@remote_host:destination_directory
@gp187
gp187 / install_rx580.sh
Last active March 11, 2018 08:21
AMD RX580 6 card rig | Install Ubuntu 16 and drivers
#!/bin/sh
# Get the Mining Driver
# https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-Pro-Beta-Mining-Driver-for-Linux-Release-Notes.aspx
# Install it normally
# KNOWN ISSUE: if ubuntu fails to load after the restart means the intel driver was remove
# use this to add it again
# sudo apt install -f intel-graphics-update-tool
@gp187
gp187 / odoo-v9-install.sh
Created October 31, 2017 14:29
Odoo V9 Install
################################################################################
# Script for installing Odoo V9 on Ubuntu 14.04 LTS (could be used for other version too)
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
# in one Ubuntu because of the different xmlrpc_ports
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh
# Place this content in it and then make the file executable:
@gp187
gp187 / gradle-nexus-letsencrypt.sh
Created October 10, 2017 23:15
How to make Gradle work with Letsencrypt certificates in Nexus
#!/bin/sh
# Download the certificate you need from the website
openssl s_client -connect my-nexus-website.com:443 > www.crt
# Go into the certificate and delete everything before -------START ----- and after ------ END ------
# Create your own keystore to use for this certificate -- add as many as you want
sudo keytool -trustcacerts -keystore cacerts -storepass cacerts -noprompt -importcert -alias www -file www.crt

Keybase proof

I hereby claim:

  • I am gp187 on github.
  • I am c3zar (https://keybase.io/c3zar) on keybase.
  • I have a public key whose fingerprint is 814C 5CCF 901C C2A9 D877 00F9 07BF 57AE 8384 E40A

To claim this, I am signing this object:

@gp187
gp187 / linkedin-industry-codes.json
Created February 9, 2017 14:03
LinkedIn Full Industry Codes in JSON
[
{"Code": 47,"Groups": "corp, fin","Description": "Accounting"},
{"Code": 94,"Groups": "man, tech, tran","Description": "Airlines/Aviation"},
{"Code": 120,"Groups": "leg, org","Description": "Alternative Dispute Resolution"},
{"Code": 125,"Groups": "hlth","Description": "Alternative Medicine"},
{"Code": 127,"Groups": "art, med","Description": "Animation"},
{"Code": 19,"Groups": "good","Description": "Apparel & Fashion"},
{"Code": 50,"Groups": "cons","Description": "Architecture & Planning"},
{"Code": 111,"Groups": "art, med, rec","Description": "Arts and Crafts"},
{"Code": 53,"Groups": "man","Description": "Automotive"},
@gp187
gp187 / currencies.json
Created February 9, 2017 12:32
All currencies in JSON -- Array of Objects
[{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
}, {
"symbol": "CA$",
@gp187
gp187 / ubuntu16-disable-desktop-gui
Created February 1, 2017 09:56
OnStartup: no UI and No GUI. Just login screen for ubuntu 16
To boot to console:
`sudo systemctl set-default multi-user.target`
You must then edit /etc/default/grub by removing splash from the GRUB command line. (Remember to update GRUB afterward: sudo update-grub).
To get to the Unity desktop from the console, you must enter the command:
sudo systemctl start lightdm.service
@gp187
gp187 / webstorm-phpstorm-inotify-fix
Last active June 13, 2023 08:56
Webstorm, PHPStorm Inotify watch limit is too low
To prevent this situation it is recommended to increase the watches limit (to, say, 512K):
1. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:
fs.inotify.max_user_watches = 524288
2. Then run this command to apply the change:
sudo sysctl -p --system
And don't forget to restart your IDE.
@gp187
gp187 / b.sh
Created October 3, 2016 17:23
Visual Studio Code 2015 Ubuntu 16 multi cursor
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"