Skip to content

Instantly share code, notes, and snippets.

@stalniy
stalniy / import-gitlab.sh
Created November 22, 2016 13:45
Creates and pushes projects from one gitlab to another
#!/bin/bash
# Put proper URLs here
SOURCE_GITLAB_URL=http://source.example.net/api/v3/
DESTINATION_GITLAB_URL=http://dest.example.net/api/v3/
DESTINATION_GIT_URL=git@dest.example.net
SOURCE_PRIVATE_KEY=
DESTINATION_PRIVATE_KEY=
TMP_DIR=`mktemp -d`
@juanje
juanje / Description.md
Last active November 27, 2025 21:16
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }
@aras-p
aras-p / preprocessor_fun.h
Last active March 5, 2026 23:36
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,