Skip to content

Instantly share code, notes, and snippets.

Guido Krömer Cacodaimon

Block or report user

Report or block Cacodaimon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Cacodaimon
Cacodaimon / .bashrc
Last active May 4, 2018
A powerline inspired bashrc
View .bashrc
#!/bin/bash
[ -z "$PS1" ] && return
# ~/.local/share/fonts/
# https://github.com/powerline/fonts
color_black_black='\[\e[0;30m\]'
color_black_red='\[\e[0;31m\]'
color_black_green='\[\e[0;32m\]'
@Cacodaimon
Cacodaimon / Commands
Last active Aug 29, 2015
CacoCloud Dockerfile
View Commands
sudo docker build -t="caco-cloud" .
sudo docker run -p 6060:443 caco-cloud
sudo docker run -v /home/caco/tmp/:/var/www/caco-cloud/database -d -p 6060:443 caco-cloud
@Cacodaimon
Cacodaimon / Install
Last active Feb 19, 2016
Caco Cloud Installation on DigitalOcean Debian 7
View Install
#Follow these steps to install CacoCloud:
#Login
ssh -i .ssh/id_rsa_home root@
#Install all packages
apt-get install git apache2 sqlite3 php5 php5-imap php5-mcrypt php5-sqlite php5-curl
#Create a self signed cert
mkdir /etc/apache2/ssl
@Cacodaimon
Cacodaimon / key-bindings-user.json
Created Mar 1, 2014
SublimeText3 german keyboard show console keybinding.
View key-bindings-user.json
[
{ "keys": ["ctrl+^"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }
]
View .bashrc
#!/bin/bash
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=10000
HISTFILESIZE=20000
export EDITOR=nano
alias ls='ls --color'
alias ll='ls -lah'
alias ssh='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
View Sublime Text Config
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_face": "DroidSansMono",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"spell_check": true,
"tab_size": 4,
View SlimJsonView.php
class SlimJsonView extends \Slim\View
{
public function render($template = null)
{
$app = \Slim\Slim::getInstance();
!$this->has('error') && $this->data->remove('flash');
!$this->has('flash') && $this->data->remove('flash');
$app->response()->header('Content-Type', 'application/json');
@Cacodaimon
Cacodaimon / SumByKey.js
Created Nov 4, 2013
A simple AngularJS filter for summarizing the values of an array containing objects by a key.
View SumByKey.js
angular.module('caco.feed.filter', [])
.filter('sumByKey', function() {
return function(data, key) {
if (typeof(data) === 'undefined' || typeof(key) === 'undefined') {
return 0;
}
var sum = 0;
for (var i = data.length - 1; i >= 0; i--) {
sum += parseInt(data[i][key]);
@Cacodaimon
Cacodaimon / validate_by_docblock
Created Oct 24, 2013
Quick and dirtyphp docblock based validation prototype...
View validate_by_docblock
<?php
abstract class Validate
{
public abstract function isValid($value);
}
class ValidateInt extends Validate
{
public function isValid($value)
@Cacodaimon
Cacodaimon / Mcrypt.php
Last active Dec 24, 2015
Easy to use Mcrypt wrapper class.
View Mcrypt.php
<?php
namespace Caco\Password;
/**
* Mcrypt wrapper class.
*
* @author Guido Krömer <mail@cacodaemon.de>
* @package Caco\Password
*/
class Mcrypt
You can’t perform that action at this time.