Skip to content

Instantly share code, notes, and snippets.

View luceos's full-sized avatar
👨‍🎨
Painting web

Daniël Klabbers luceos

👨‍🎨
Painting web
View GitHub Profile
@luceos
luceos / svn-commands
Created March 14, 2012 15:29
Most used svn commands
# zie alle openstaande beschikbare commits
svnmerge.py avail -l
# commit een bepaalde revisie
svnmerge.py merge -r .xxx
# commit deze revisie direct terug naar de huidige branche
svn commit -F svn<tab> (commit message)
# ignore files from svn
svn propset svn:ignore <file> .
@luceos
luceos / git-commands
Last active July 31, 2020 19:19
git method to install and update submodules
# commandline to initialize and download submodules
git submodule init
git submodule update
# commandline command to add commit to and close issue
# use any of these in your commit message:
# - fixes #xxx
# - fixed #xxx
# - fix #xxx
# - closes #xxx
@luceos
luceos / slanger-ubuntu
Created December 6, 2012 08:45
Installing slanger on ubuntu
install rvm (rvm.io) and at least the 1.9.3-head by using the code: rvm install 1.9.3-head
Test whether this version is installed with rvm -v
If not try rvm reinstall 1.9.3-head
Now install the ruby gem daemons: gem install daemons
Also install the slanger gem, even though you are using the git repo, this ensures all dependencies are auto-loaded: gem install slanger
Now run your server
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# Luceos,
#
class String
def valid_json?
begin
JSON.parse(self)
return true
rescue Exception => e
return false
end
end
end
@luceos
luceos / temp.php
Last active December 17, 2015 15:58
raygastje
<?php
include("connect.php");
session_start();
$projecten_id = $_GET["projecten_id"];
$_SESSION["projecten_id"] = $projecten_id;
$projecten = mysql_query("SELECT p.*, a.project_afbeeldingen, b.project_bestand FROM `projecten` AS p, `project_afbeeldingen` AS a, `project_bestanden` AS b WHERE `projecten_id` = $projecten_id AND a.item_id = p.item_id AND p.bestand_id = b.bestand_id");
if( !$projecten ) { echo sprintf( "Query failed; %s" , mysql_error()); }
@luceos
luceos / example.php
Last active December 20, 2015 03:19
HostingXS api example
<?PHP
require_once "<path>/<to>/hxsclient.php";
if( array_key_exists( "domaincheck" , $_POST )) {
$api = new hxsclient( <username> , "<password>" , "<sandbox=true/false>" );
$domainavailable = $api -> checkDomain( $_POST["domaincheck"] );
}
// enter the form
@luceos
luceos / .ssh-config
Created August 29, 2013 11:25
ssh keep alive verhoging
TCPKeepAlive = yes
ServerAliveInterval = 30
ServerAliveCountMax = 12
@luceos
luceos / Laravel sources.md
Last active January 1, 2016 04:59
Laravel Sources of documentation
@luceos
luceos / install_nginx_w_spdy.sh
Last active August 29, 2015 13:55
Install nginx and compile with speedy from commandline, use parameter to select version, image_filter requires php5-gd/php_gd and libgd2-xpm-dev
#!/bin/sh
#
# Obsolete; nginx 1.5.10 has in-built option for spdy, with compilation option: --with-http_spdy_module
#
# use ./install_nginx_w_spdy.sh <version>
NGINX_VERSION=$1
TMP_PATH=/tmp