Skip to content

Instantly share code, notes, and snippets.

@stran12
stran12 / gist:1394757
Created November 26, 2011 00:43
Step-by-step installation of cGit with Nginx

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

@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
@mztriz
mztriz / twilight-urxvt
Created October 17, 2012 15:47
.Xresources twilight theme for urxvt
URxvt*termName: rxvt-256color
URxvt*scrollBar: false
URxvt*secondaryScroll: true
URxvt*shading: 50
URxvt*transparent: true
URxvt*boldFont: xft:Inconsolata:Regular:pixelsize=17
URxvt*font: xft:Inconsolata:Regular:pixelsize=17
URxvt*background: #000000
URxvt*foreground: #ffffff
@cocagne
cocagne / read_only_filesystem.py
Created November 16, 2012 16:00
Per-process, read-only filesystem view via Linux's unshare() system call
#!/usr/bin/python
import ctypes
import os
import sys
def err_exit( msg ):
print >> sys.stderr, msg
sys.exit(1)
@jizhang
jizhang / md5.clj
Created December 18, 2012 07:14
Clojure - Calculate MD5 hash of a given string.
(import 'java.security.MessageDigest
'java.math.BigInteger)
(defn md5 [s]
(let [algorithm (MessageDigest/getInstance "MD5")
size (* 2 (.getDigestLength algorithm))
raw (.digest algorithm (.getBytes s))
sig (.toString (BigInteger. 1 raw) 16)
padding (apply str (repeat (- size (count sig)) "0"))]
(str padding sig)))
@Mins
Mins / mysql_secure.sh
Last active May 31, 2024 14:19
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@livibetter
livibetter / README.md
Last active August 17, 2019 16:34
Let It Rain!
@zhzhxtrrk
zhzhxtrrk / wiki.lua
Last active April 19, 2020 18:31
pandoc confluence markup writer
-- that is very similar to that of pandoc's HTML writer.
-- There is one new feature: code blocks marked with class 'dot'
-- are piped through graphviz and images are included in the HTML
-- output using 'data:' URLs.
--
-- Invoke with: pandoc -t sample.lua
--
-- Note: you need not have lua installed on your system to use this
-- custom writer. However, if you do have lua installed, you can
-- use it to test changes to the script. 'lua sample.lua' will
@dzholev
dzholev / linux-mint-intellij-fonts.txt
Last active April 24, 2022 10:49
Linux Mint and IntelliJ IDEA - fonts settings
DISCLAIMER: Use the following instructions at your own risk!
Tested with: Linux Mint 17 Cinnamon 64-bit, IntelliJ IDEA 13.1
I. Setup Linux Mint system fonts
1. Execute in terminal:
sudo apt-get install fonts-droid
2. Go to System Settings -> Appearance -> Fonts: