Skip to content

Instantly share code, notes, and snippets.

{
"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,
#!/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'
@Cacodaimon
Cacodaimon / key-bindings-user.json
Created March 1, 2014 12:49
SublimeText3 german keyboard show console keybinding.
[
{ "keys": ["ctrl+^"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }
]
@Cacodaimon
Cacodaimon / Commands
Last active August 29, 2015 14:05
CacoCloud Dockerfile
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
#!/bin/bash
echo "Foo"
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName phpzend
DocumentRoot /var/www/zend/public
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<?php
$mongoDb = new Mongo;
$article = $mongoDb->blog->article->findOne(array(
'_id' => new MongoId($_GET['_id'])
));
ob_start();
?>
<!DOCTYPE html>
@Cacodaimon
Cacodaimon / backup.sh
Created September 26, 2012 15:11 — forked from karussell/backup.sh
Backup ElasticSearch with rsync
# TO_FOLDER=/something
# FROM=/your-es-installation
DATE=`date +%Y-%m-%d_%H-%M`
TO=$TO_FOLDER/$DATE/
echo "rsync from $FROM to $TO"
# the first times rsync can take a bit long - do not disable flusing
rsync -a $FROM $TO
# now disable flushing and do one manual flushing
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Routing;
using MongoDB.Driver;
using MongoDB.Bson;
@Cacodaimon
Cacodaimon / Index.aspx
Created October 2, 2012 20:00
Used @ cacodaemon.de
<%@ Page Title="" Language="C#" MasterPageFile="/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<MongoDB.Driver.MongoCursor>" %>
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
<% foreach (Blog.Article article in this.ViewData.Model) { %>
<article>
<h2><a href="<%= Url.Action("ShowArticle", "Blog", new RouteValueDictionary(new { id = article.Id })) %>"><%= article.Title %></a></h2>
<span><%= article.Date %></span>
<p><%= article.Text %></p>
<p></p>
<% if (article.Comments == null) { %>
<p>Comments: <a href="<%= Url.Action("ShowArticle", "Blog", new RouteValueDictionary(new { id = article.Id })) %>#comments">[0]</a></p>