Skip to content

Instantly share code, notes, and snippets.

View geo-stanciu's full-sized avatar

Geo Stanciu geo-stanciu

  • Bucharest, Romania
View GitHub Profile
cd F:\PostgreSQL\9.6\data
psql -U postgres -d devel -W -c "SELECT pg_start_backup('BK 20161120');";
-- in cmd (node the last dot in command)
"C:\Program Files\Java\jdk1.8.0_74\bin\jar.exe" cvf F:/backup/data_20161118.zip -C "F:/PostgreSQL/9.6/data" .
-- in powershell (node the first ampersand and the last dot in command)
& 'C:\Program Files\Java\jdk1.8.0_74\bin\jar.exe' cvf F:/backup/data_20161118.zip -C "F:/PostgreSQL/9.6/data" .
psql -U postgres -d devel -W -c "SELECT pg_xlogfile_name(pg_stop_backup());"
@geo-stanciu
geo-stanciu / Install Antergos
Last active December 31, 2016 20:37
Install Antergos
yaourt google-chrome
sudo pacman -S docker
sudo systemctl start docker
sudo pacman -S vim
cat << EOF > ~/.vimrc
set tabstop=4
set shiftwidth=4
@geo-stanciu
geo-stanciu / Setup ramdisk for firefox profile and cache
Last active February 25, 2026 15:53
Setup ramdisk for firefox profile and cache
for more details:
https://fixmynix.com/speed-up-firefox-with-ram-cache-and-tmpfs-linux/
--------------------------------------------------------------------------------
-- go to firefox -> about:config
Search for browser.cache.use_new_backend , if the value is 0 , modify it to 1 , this makes the caching efficient.
@geo-stanciu
geo-stanciu / docker cheatsheet
Created August 5, 2017 12:45
docker cheatsheet
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
docker images -a # Show all images on this machine
@geo-stanciu
geo-stanciu / golang-owner.txt
Created August 8, 2017 18:36
golang change owner of GOROOT
ls $(go env GOROOT)/pkg && sudo chown -R $USER $(go env GOROOT)/pkg
@geo-stanciu
geo-stanciu / config kubuntu.txt
Last active August 17, 2017 16:15
config kubuntu
sudo apt-get update
sudo apt-get install build-essential
# codecs
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install kubuntu-restricted-extras
# vlc + mplayer
sudo apt-get install curl
@geo-stanciu
geo-stanciu / postgres settings
Last active July 26, 2019 20:02
my postgres settings
# general
ALTER SYSTEM SET autovacuum_max_workers = 4;
ALTER SYSTEM SET autovacuum_vacuum_scale_factor = 0.01;
# backup settings
ALTER SYSTEM SET wal_level = 'logical';
ALTER SYSTEM SET wal_log_hints = 'on';
ALTER SYSTEM SET archive_mode = 'on';
ALTER SYSTEM SET wal_compression='on';
ALTER SYSTEM SET max_wal_senders = '8';
@geo-stanciu
geo-stanciu / postgres recovery.conf
Created March 6, 2018 10:42
postgres recovery.conf
standby_mode = 'on'
primary_conninfo = 'user=postgres passfile=''C:\\\\Users\\\\geo\\\\AppData\\\\Roaming/postgresql/pgpass.conf'' host=localhost port=5432 sslmode=prefer sslcompression=1 krbsrvname=postgres target_session_attrs=any'
recovery_target_time='2018-02-23 22:25:00+02:00'
restore_command = 'copy "D:\\backup\\archive\\%f" "%p"'
@geo-stanciu
geo-stanciu / Java - Crystal Reports
Created March 16, 2018 09:49
Java - Crystal Reports
# CRConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
<!-- <reportlocation>/reports</reportlocation> -->
<timeout>10</timeout>
<keycode>MyLicenseKeyCodeHere</keycode>
</CrystalReportEngine-configuration>
# log4j.properties
@geo-stanciu
geo-stanciu / setup ubuntu-server
Last active May 26, 2018 15:40
setup ubuntu-server
# get iso
wget http://releases.ubuntu.com/16.04.4/ubuntu-16.04.4-server-amd64.iso
# create vm path
mkdir -p /backup/virtual_machines/LicensePlates/Snapshots
cd /backup/virtual_machines/LicensePlates
# VM name
VM='LicensePlates'