Skip to content

Instantly share code, notes, and snippets.

View noherczeg's full-sized avatar

Norbert Csaba Herczeg noherczeg

View GitHub Profile
@noherczeg
noherczeg / angular-hiders.css
Created January 26, 2015 02:56
put this in the head section, so angular can hide templates properly before values are initialized
<style>
/* This helps the ng-show/ng-hide animations start at the right place. */
/* Since Angular has this but needs to load, this gives us the class early. */
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], [ng-hide], .ng-cloak, .x-ng-cloak, .ng-hide {
display: none !important;
}
</style>
@noherczeg
noherczeg / nginx.angular.conf.txt
Last active June 27, 2023 15:56
Sample nginx configuration for an angular frontend
worker_processes 4;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
package hello;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
@noherczeg
noherczeg / pgsetup
Last active August 29, 2015 14:17
postgres database and schema creation
su - postgres
psql
CREATE ROLE stash WITH LOGIN PASSWORD 'stash' VALID UNTIL 'infinity';
CREATE DATABASE stash WITH ENCODING='UTF8' OWNER=stash CONNECTION LIMIT=-1;
\connect stash;
CREATE SCHEMA stash AUTHORIZATION stash;
ALTER USER stash SET SEARCH_PATH TO stash;
@noherczeg
noherczeg / gits.txt
Created March 25, 2015 16:06
git commands
git tag -a v0.0.1 -m "Release version 0.0.1"
git push -u origin master --tags
@noherczeg
noherczeg / git_sh_to_webstorm.txt
Created March 27, 2015 09:01
adding git shell/sh to webstorm
Settings > Tools > Terminal
[git install dir]/bin/sh.exe -login -i
@noherczeg
noherczeg / amd_conf.txt
Created April 15, 2015 22:14
confs_15_04
mobo: GIGABYTE GA-970A-UD3P 24.000
ram: HyperX 8GB Savage DDR3 1866MHz CL9 25.000
cpu: AMD FX-8350 4.00GHz AM3+ BOX 51.000
vga: SAPPHIRE 11217-01-20G R9 270X 2G GDDR5 DUAL-X OC 52.000
psu: FSP HYPER 600 19.000
ssd: SAMSUNG 120GB 850 EVO 22.500
hdd: WD Purple 2TB 5400rpm 64MB SATA3 26.000
haz: FRACTAL DESIGN Define R5 32.000
huto: ARCTIC COOLING Freezer 13 8.500
----------------------------------------------------------------
@noherczeg
noherczeg / isitclearnoworwhat.js
Last active August 29, 2015 14:21
Demystification of functions in sequelizejs
/**
* Old version
*/
return sequelize.transaction(function (t) {
return User.create({
firstName: 'Abraham',
lastName: 'Lincoln'
}, {transaction: t}).then(function (user) {
return user.setShooter({
firstName: 'John',
/* guest additions */
sudo ./VBoxLinuxAdditions.run
/* jdk7 */
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
java -version
// MAVEN DEP DOWNLOAD BUG
Known Ubuntu + java + keytool bug, where maven can't download dependencies:
CA certs are corrupt somehow, so we need to regen them....
https://help.ubuntu.com/lts/serverguide/certificates-and-security.html#generating-a-csr
// JAVA
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer