Skip to content

Instantly share code, notes, and snippets.

@trodrigues
trodrigues / gist:1023167
Created June 13, 2011 16:51
Checkout only certain branches with git-svn
If you want to clone an svn repository with git-svn but don't want it to push all the existing branches, here's what you should do.
* Clone with git-svn using the -T parameter to define your trunk path inside the svnrepo, at the same time instructing it to clone only the trunk:
git svn clone -T trunk http://example.com/PROJECT
* If instead of cloning trunk you just want to clone a certain branch, do the same thing but change the path given to -T:
git svn clone -T branches/somefeature http://example.com/PROJECT
@atenni
atenni / README.md
Last active October 31, 2024 06:12
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

anonymous
anonymous / night-before-opsmas.txt
Created December 24, 2013 07:19
Twas the night before Opsmas..
'Twas the night before Christmas, when all through the racks
Not a server was alerting, not even Compaqs.
The backups were written to tapes with care
In hopes that later the data would be there.
The machines were nestled all snug in their sleds
Whilst visions of vengeance danced in their heads;
And oncall in his three-wolf and I in my rack.
Had just settled down for some syn and some ack.
@aadnk
aadnk / AnvilListener.java
Created April 13, 2014 00:44
Detect when anvils are broken by overuse.
package com.comphenix.example;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@dandirks
dandirks / gist:05a6e2d22d38349263ed
Created March 7, 2015 21:05
Straw Poll - New Poll API
Make a POST with something like the following body to "http://strawpoll.me/api/v2/polls"
{
"title": "Poll title",
"options":[
"Option #1",
"Option #2",
"Option #3"
],
"multi": true,
  • le.doot.generation: !
  • zewl.bot: .
  • chester.bot.doot.doot: $
  • steveice (interim): %
  • spongybot: #
  • totallynotfabbot: -
  • rob.the.bot: ?
  • wee.bot: `
  • hintss.bot: lol
anonymous
anonymous / abyss-as-a-service
Created November 20, 2015 14:56
Floating serenely through a peaceful abyss, a sigh escapes; content.
A siren wails, you're jolted from your respite
/dev/xsdb1 is at 100%
A cacophony of alerts screech from the phone.
Upset is the fragile balance, failure cascades.
Was only a matter of time.
Get some coffee.
All you ping seems to crumble, machine after machine fall; a massacre of uptime.
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 12, 2024 03:32
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@denji
denji / README.md
Last active October 17, 2024 15:35 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active November 6, 2024 13:42
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.