Skip to content

Instantly share code, notes, and snippets.

View t0kieu's full-sized avatar

Viliam Tokarcik t0kieu

View GitHub Profile
@t0kieu
t0kieu / .gitlab-ci.yml
Created March 17, 2017 09:39 — forked from daicham/.gitlab-ci.yml
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@t0kieu
t0kieu / config.yml
Last active September 21, 2015 09:09 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:

After an apt-get upgrade on my Forge box, both php and nginx got upgraded, and while browsing my sites, PHP FPM was being hit by nginx, but it returned nothing, zilch, nada.

Nothing on laravel.log.

Something in the nginx log:

10.10.10.10 - - [23/Sep/2014:11:52:09 -0300] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"

How to install cGit on Nginx (Ubuntu server)

Step-by-step installtion of cGit on nginx without funky rewrite rules.

Pre-requisites

This is for

# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@t0kieu
t0kieu / httpd.conf
Created August 10, 2012 14:35 — forked from jadell/httpd.conf
Dynamic Subdomains in Apache
RewriteEngine on
RewriteRule ^/icons/ - [L]
# look for URLS like 'subdir.username.foo.bar'
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ([^.]+)\.([^.]+)\.foo\.bar$
RewriteCond /home/%2/public_html/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ([^.]+)\.([^.]+)\.foo\.bar(?::\d+)?(.*) /home/$2/public_html/$1$3 [L]
# look for URLS liks 'username.foo.bar'
@t0kieu
t0kieu / HOWTO.md
Created July 25, 2012 13:26 — forked from bjornharrtell/HOWTO.md
How to configure and use JBoss AS 7 with Hibernate Spatial and PostGIS

How to configure and use JBoss AS 7 with Hibernate Spatial and PostGIS

This is in the scenario where you want JBoss to handle the datasource and transactions, for example when using injected @PersistenceContext in a @Stateless resource. I like it especially when writing REST services with JAX-RS (example code included below).

Create dir:

/modules/org/postgresql/main