This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/select.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
int main(int argc, char ** argv) { | |
char * dev_short = (argc > 1) ? argv[1] : "sda1"; | |
char dev[512]; | |
snprintf(dev, sizeof(dev), "/sys/block/%s/size", dev_short); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Set up an ssh tunnel to our proxy server + socks5 proxy endpoint at 127.0.0.1:1080 | |
ssh -D 1080 -N -c blowfish -f proxy.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: yumrepo | |
# Definition:: yumrepo | |
# | |
# Copyright 2010, Tippr Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OpsApi | |
# Helper methods for `ActiveRecord::ConnectionAdapters::MysqlAdapter` to enable SQL queries | |
# tracing functionality. There are two goals: | |
# | |
# * Add source line into the query itself so it would be possible to understand where | |
# the query was issues from: | |
# | |
# SELECT * FROM `admins` WHERE | |
# ((`admins`.`user_id` = 1)) LIMIT 1 | |
# /*OOPS:app/models/user.rb:72:in `admin?'*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that your ~/.inputrc contains this | |
set convert-meta off | |
set input-meta on | |
set output-meta on | |
Install the REAL GNU readline from source | |
$ curl ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz | tar xfz - && cd readline-6.2 && ./configure --enable-multibyte && make && sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CarrierWave | |
module FFMPEG | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def faststart | |
process :faststart => true | |
end | |
def transcode options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 4f69a748ab820c6a8bd204f94d13d970847f575c Mon Sep 17 00:00:00 2001 | |
From: RPM Builder <[email protected]> | |
Date: Thu, 29 Dec 2011 19:48:52 +0000 | |
Subject: [PATCH] Backport randomized hash patch from upstream | |
--- | |
source/inits.c | 4 ++ | |
source/random.c | 74 ++++++++++++++++++++++++++++++--------- | |
source/st.c | 14 +++++++- | |
source/string.c | 7 +++- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
import sun.jvm.hotspot.memory.*; | |
import sun.jvm.hotspot.oops.*; | |
import sun.jvm.hotspot.debugger.*; | |
import sun.jvm.hotspot.runtime.*; | |
import sun.jvm.hotspot.tools.*; | |
import sun.jvm.hotspot.utilities.*; | |
public class DirectMemorySize extends Tool { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'open3' | |
def rvm_env(cmd) | |
Open3.popen3 "bash -c 'source ~/.rvm/scripts/rvm && #{cmd}'" do |stdin, stdout, stderr, thread| | |
thread.join | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Daniel De Marco - [email protected] - 2012-02-23 | |
# suds from https://fedorahosted.org/suds/ | |
import suds | |
import sys | |
def get_warr(svctag): |
OlderNewer