Skip to content

Instantly share code, notes, and snippets.

@linuxaged
linuxaged / git_bible.md
Created April 2, 2019 04:21 — forked from dmglab/git_bible.md
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@linuxaged
linuxaged / OpenWithSublimeText3.bat
Created June 26, 2017 10:46 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
android {
// .. set up build flavors etc here
//instead of "app-release.apk" this method will rewrite the name to
// "MyCoolCompany-MyGreatProduct-v<defaultConfig.versionName>-RELEASE.apk which is much better suited for archiving and overall handling
// To restore the default behavior just delete the whole block below
applicationVariants.all { variant ->
def apk = variant.outputFile;
@linuxaged
linuxaged / sysctl.conf
Last active August 29, 2015 14:03 — forked from jedi4ever/gist:903751
ubuntu server performance tunning
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@linuxaged
linuxaged / tcpEcho.go
Created July 8, 2014 07:16 — forked from iwanbk/gist:2295233
golang tcp connect
package main
import (
"net"
"os"
)
func main() {
strEcho := "Halo"
servAddr := "localhost:6666"
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
std::tuple<int,int,std::vector<uint8_t>> t(10, 20, {0,1,2,3,4,5,6,7,8,9});
TEST(Performance, Water) {
auto start = std::chrono::high_resolution_clock::now();
for (size_t i=0; i<500000; ++i) {
StreamType res;
serialize(t,res);
}
auto tot_time = std::chrono::duration_cast<std::chrono::microseconds>(
namespace detail {
template <class T>
class serialize_helper;
template <class T>
void serializer(const T& obj, StreamType::iterator&);
template <class tuple_type>
inline void serialize_tuple(const tuple_type& obj, StreamType::iterator& res, int_<0>) {
#include <tuple>
#include <numeric>
#include <vector>
#include <string>
// forward declaration of get_size() method
template <class T>
size_t get_size(const T& obj);
namespace detail {
1.CentOS 6.3
#yum install make gcc
#cd /opt
$wget http://redis.googlecode.com/files/redis-2.x.xx.tar.gz
$tar zxf redis-2.x.xx.tar.gz
$cd redis-2.x.xx
$make
$make install
//////