Create an initial repository following the instructions below.
initial_repo.sh
#!/usr/bin/env sh
// See the polkit(8) man page for more information | |
// about configuring polkit. | |
// SAVE IT ON: /etc/polkit-1/rules.d/ | |
// replace the ntfs-3g package: ntfs-3g-fuse | |
// Allow udisks2 to mount devices without authentication | |
// for users in the "wheel" group. | |
polkit.addRule(function(action, subject) { | |
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" || | |
action.id == "org.freedesktop.udisks2.filesystem-mount") && |
curl -i -X POST -H "Content-Type: multipart/form-data" \ | |
-F "file=@/home/USERNAME/YOUR_FILE_HERE.xlsx \ | |
-F "param1=4" \ | |
-F "param2=CALCULATED" \ | |
-F "period=1" \ | |
-F "effective_date=2020-31-31" \ | |
http://localhost:8080/entrypoint_x | |
# case you dont have $BROWSER env. var defined | |
$ xdg-settings set default-web-browser firefox-developer-edition.desktop | |
$ xdg-mime default firefox-developer-edition.desktop x-scheme-handler/http | |
$ xdg-mime default firefox-developer-edition.desktop x-scheme-handler/http |
#!/usr/bin/env sh | |
# alternative to: openvpn-update-resolv-conf: aur package | |
# I don't want to install a openvpn script to just handle dns entries for a VPN connection | |
# So, I created this script to do it | |
if ps ax | grep "openvpn --config" | grep "OPENVPN_CONFIG_PROVIDED_BY_COMPANY.ovpn" > /dev/null | |
then | |
echo "VPN CONNECTED" | |
echo "restoring resolv.conf..." | |
sudo sed -i '/DNS_SERVER_IP/d' /etc/resolv.conf |
Sometimes you are working in a feature branch that was opened a long time ago and, you would like to reorganize all the commits from this feature branch.
This branch normally can be very confusing to read and there are some tips that you should know before doing a rebase (squashing).
The first thing that you should do is to understand how is organized your branch.
SQLAlchemy doesn't generate a CREATE/DROP script for an existing enumeration datatype in Postgresql.
For that, you need to manually change your generated version script - versions/HASH_NUMBER.py
and change the
datatype manually.
versions/SHA.py
def upgrade():
if not op.get_context().as_sql:
connection = op.get_bind()
$ git config --global --unset credential.helper
$ git config --system --unset credential.helper
-- Create enumetation | |
CREATE TYPE currency AS ENUM ('USD', 'BRL', 'USD'); | |
-- Add value | |
ALTER TYPE currency ADD VALUE 'GBP'; | |
-- Remove value | |
DELETE FROM pg_enum | |
WHERE enumlabel = 'GBP' | |
AND enumtypid = ( SELECT oid FROM pg_type WHERE typname = 'currency') |
#!/usr/bin/env sh | |
# It seems to have some cuda issues with sleep/suspend | |
# I had this with pytorch | |
sudo rmmod nvidia_uvm | |
sudo modprobe nvidia_uvm | |