Skip to content

Instantly share code, notes, and snippets.

View purwandi's full-sized avatar
🏠
Working from home

purwandi purwandi

🏠
Working from home
View GitHub Profile
@davidbehan
davidbehan / atmail-exim-commands
Created September 3, 2013 21:14
Some atmail/exim commands for searching and managing the message queue
# start/stop/restart atmail
/etc/init.d/atmailserver start
/etc/init.d/atmailserver stop
/etc/init.d/atmailserver restart
# count of messages in queue
/usr/local/atmail/mailserver/bin/exim -bpc
# list of messages in queue
/usr/local/atmail/mailserver/bin/exim -bp
@eudes
eudes / nginx.conf
Created February 1, 2013 21:18
Calomel.org /etc/nginx.conf Nginx reverse proxy to a few back end web servers
#######################################################
### Calomel.org /etc/nginx.conf BEGIN
#######################################################
worker_processes 3;
#worker_rlimit_nofile 1024;
events {
worker_connections 64;
#accept_mutex_delay 50ms;
@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@dhrrgn
dhrrgn / Db.php
Created December 8, 2012 02:31
The Db file for easy use of the Database package from L4 outside of L4.
<?php
use Illuminate\Database\Connectors\ConnectionFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\ConnectionResolver;
use Illuminate\Database\DatabaseManager;
class Db {
private static $resolver = null;
@mtigas
mtigas / README.md
Last active December 16, 2022 02:12
this is the nginx config for https://mike.tig.as/, with config to avoid the BEAST exploit (by using TLS 1.2+ ciphers or RC4) and enable SSL perfect forward secrecy (by preferring ECDHE ciphers)

[mike.tig.as][mta] server configuration

This gist contains the nginx and tor configurations for the [mike.tig.as][mta] servers, mainly to show:

  • Use of the chris-lea/nginx-devel PPA to allow use of SPDY.
  • ssl_ciphers selection to mitigate BEAST attack, enable [perfect forward secrecy][pfs] if possible and select the strongest possible ciphers within those bounds. (Exception is made for several ciphers at the end of list, for compatibility reasons.)
@panzi
panzi / 00_head.html
Created November 1, 2012 04:58
Save/download data generated in JavaScript (1)
<!DOCTYPE html>
<html>
<head>
<title>Save Generated Data</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"/>
<script type="text/javascript">
// <![CDATA[
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 22, 2024 05:53
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'