Skip to content

Instantly share code, notes, and snippets.

Avatar
👽

Nic Nilov nicnilov

👽
View GitHub Profile
@nicnilov
nicnilov / doc.md
Last active Nov 17, 2020
Run RawTherapee custom linux build on Windows 10 with sharp fonts on a HiDPI display
View doc.md

Run RawTherapee custom linux build on Windows 10 with sharp fonts on a HiDPI display

Note that this setup may be a moot point as there are important issues when running RT under WSL. One is the overall low performance compared to a Linux in a Virtual Box setup. Another is repeatable freezes of the VM when the contents of the directory currently open in RT are modified on the host. For these and other reasons the Virtual Box setup turned out to be superior to the WSL.

The credit for WSL setup for graphical apps belongs to https://medium.com/@jeffborch/running-the-scenic-elixir-gui-framework-on-windows-10-using-wsl-f9c01fd276f6.

Configure Windows Subsystem for Linux

1. Enable WSL

@nicnilov
nicnilov / script.sh
Last active Oct 7, 2020
RawTherapee compile on macOS Mojave with llvm 10
View script.sh
# Install llvm 10
brew install llvm
# or brew install llvm@10 if it is not the last one anymore
# Clone the repo
cd <some directory>
git clone git@github.com:Beep6581/RawTherapee.git
cd RawTherapee
View RawTherapee compile on macOS Mojave with llvm@8
# Install llvm@8
brew install llvm@8
# Clone the repo
cd <some directory>
git clone git@github.com:Beep6581/RawTherapee.git
cd RawTherapee
View noindex
noindex () {
mdutil -i off .
sudo rm -rf .{,_.}{fseventsd,Spotlight-V*,Trashes,DocumentRevisions-V*}
mkdir .fseventsd
touch .fseventsd/no_log .metadata_never_index .Trashes
echo "Done"
}
@nicnilov
nicnilov / retry.sh
Created Feb 28, 2019 — forked from felipou/retry.sh
Retry command
View retry.sh
#
# Created by Felipe Machado - 2016/02/14
#
# A retry command for bash
# Retries the given command up to MAX_RETRIES, with an interval of SLEEP_TIME
# between each retry. Just put it on your bash_profile and be happy :)
# Usage:
# retry [-s SLEEP_TIME] [-m MAX_RETRIES] COMMAND_WITH_ARGUMENTS
#
# Codes used as reference:
@nicnilov
nicnilov / pgdb2csv.sh
Created Sep 15, 2018
Dump postgresql database to csv
View pgdb2csv.sh
#!/bin/bash
DB_SCHEMA="public"
DB_USER="postgres"
DB_HOST="localhost"
DB_PORT="db_port"
DB_NAME="db_name"
# DB_PASS="" to be passed from shell
psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME" -Atc "select tablename from pg_tables where schemaname='$DB_SCHEMA'" $DB_NAME |\
View script.sh
pg_ctl -D /usr/local/var/postgresql@9.6 start
pg_ctl -D /usr/local/var/postgresql@9.6 stop
@nicnilov
nicnilov / script.rb
Created Dec 9, 2017
Mailgun console test
View script.rb
mg_client = Mailgun::Client.new('api-key')
message_params = {
from: 'alice@example.com',
to: 'bob@example.com',
subject: 'The Ruby SDK is awesome!',
text: 'It is really easy to send a message!'
}
mg_client.send_message('mg.registered.domain', message_params)
@nicnilov
nicnilov / disable.sh
Created Oct 23, 2017 — forked from pwnsdx/disable.sh
Disable bunch of #$!@ in Sierra (Version 2.1)
View disable.sh
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
@nicnilov
nicnilov / gist:bc30fd01d9f58fd9dc7e64eb076495ea
Created Jun 1, 2017
Brew revert Postgresql to 9.4 after auto upgrade and use existing data directory
View gist:bc30fd01d9f58fd9dc7e64eb076495ea
brew search postgres
brew uninstall postgresql
brew install postgresql@9.4
brew link postgresql@9.4 --force
pg_ctl -D /usr/local/var/postgres/ start # << specify the existing data directory and not the newly installed one
You can’t perform that action at this time.