Skip to content

Instantly share code, notes, and snippets.

View kuops's full-sized avatar
😉
I may be slow to respond.

Shiny Hou kuops

😉
I may be slow to respond.
View GitHub Profile
@tdd
tdd / gitconfig.ini
Last active April 17, 2024 10:04
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@perusio
perusio / gist:2154235
Created March 21, 2012 23:47
High performance tuning of Nginx
## From a post on the ML, apropos this:
## http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast.
## For sysctl.conf
net.ipv4.tcp_slow_start_after_idle = 0
echo "2048 64512" > /proc/sys/net/ipv4/ip_local_port_range
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
@x-cray
x-cray / sonar-report.groovy
Last active July 3, 2019 09:23
Jenkins email-ext plugin groovy template. Generates daily Sonar violations report grouped by culprits.
<!DOCTYPE html>
<head>
<title>Sonar violations report</title>
<style type="text/css">
body
{
margin: 0px;
padding: 15px;
}
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@robcowie
robcowie / django-uwsgi.ini
Last active March 10, 2023 20:29
Supervisord config examples
[program:uwsgi]
user=robdev
command=uwsgi --ini /path/to/config.uwsgi
autostart=false
@rab
rab / .gitconfig
Last active April 1, 2024 20:51
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
@reyjrar
reyjrar / elasticsearch.yml
Last active May 12, 2023 11:58
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@hgomez
hgomez / oracledownload
Last active October 6, 2021 09:58
Oracle JVM download using curl/wget
# Downloading Oracle JVM without browser
Oracle requires you to accept its licence agreement before downloading its JVM.
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...
I used Firefox and Firebug to sniff network exchanges.
## HTTP Request :
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1
@leifg
leifg / Vagrantfile
Last active November 12, 2023 08:31
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end