Skip to content

Instantly share code, notes, and snippets.

View sohlich's full-sized avatar
🏠
Working from home

Rado Sohlich sohlich

🏠
Working from home
View GitHub Profile
#
# Nautilus
#
# Use list view by default
gsettings set org.gnome.nautilus.preferences default-folder-viewer "list-view"
# Sort files by type
gsettings set org.gnome.nautilus.preferences default-sort-order "type"
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix
@sohlich
sohlich / readme.md
Created January 28, 2020 06:23
Let's encrypt - generate SSL certificate manually via Cerbot DNS Challenge

Install Certbot

OSX

$ brew install certbot

Linux

@sohlich
sohlich / db2_error_codes
Created October 3, 2017 07:40
DB2 error codes and reason description
DB2 SQL-Error: -007 SQLState: 42601
Short Description: STATEMENT CONTAINS THE ILLEGAL CHARACTER
The specified 'character' is not a valid character in SQL statements. System action: The statement cannot be executed. Programmer response: Correct the syntax and resubmit the statement. Refer to Chapter 2 of DB2 SQL Reference for information about the valid SQL character set.
DB2 SQL-Error: -010 SQLState: 42603
Short Description: THE STRING CONSTANT BEGINNING IS NOT TERMINATED
The statement contains a string constant, beginning with 'string', that is not terminated properly. System action: The statement cannot be executed. Programmer response: Examine the statement for missing quotation marks or apostrophes in the indicated string constant.
DB2 SQL-Error: -029 SQLState: 42601
Short Description: INTO CLAUSE REQUIRED
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
<div [formGroup]="form">
<div class="container" formArrayName="optional">
<div class="row">
<div class="col-md">
<div class="buttons pull-right">
<button type="button" *ngIf="!showEdit" class="close" (click)="showEdit = true">
<span aria-hidden="true" class="fa fa-pencil"></span>
</button>
<div class="btn-edit-group">
@sohlich
sohlich / persistence.xml
Created August 6, 2016 18:30 — forked from mortezaadi/persistence.xml
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@sohlich
sohlich / after_transaction_hook
Created May 28, 2018 06:03
spring - hook on transaction commit
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter(){
public void afterCommit(){
List<Ontology> markets = ontologyRepository.findAll(dtoList
.stream()
.map(MarketDTO::getMarketId)
.collect(Collectors.toList()));
log.info("Indexing markets after deferral configuration: {}",markets.size());
ontologyIndexRepository.indexList(markets);
}
});
@sohlich
sohlich / cmd_execute.go
Created March 12, 2018 05:54
executing command line cmds
cmd := "cat " + val.Name() + " | jq ."
out, err := exec.Command("bash", "-c", cmd).Output()
@sohlich
sohlich / gist:6f3bb4385337d9459c4efe5da5e08e55
Created July 31, 2017 03:01
Uninstall XQuartz.app from OSX Yosemite/El Capitan/Sierra
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \
sudo pkgutil --forget org.macosforge.xquartz.pkg && \
rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.rnd && \
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11