Skip to content

Instantly share code, notes, and snippets.

Balazs Nagy julian7

Block or report user

Report or block julian7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View override_strcmp.c
// gcc -shared -fPIC -o -ldl override_strcmp.c
// LD_PRELOAD=$PWD/ <command>
#define _GNU_SOURCE 1
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
#define MAGIC "MAGIC"
int strcmp(const char *s1, const char *s2) {
julian7 / syslogdump.c
Last active Dec 14, 2017
Syslog server for docker images: outputs everything to stdout
View syslogdump.c
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <strings.h>
#include <errno.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#define BUFSIZE 4096

Keybase proof

I hereby claim:

  • I am julian7 on github.
  • I am julian7 ( on keybase.
  • I have a public key whose fingerprint is 1857 918C D0B4 D303 071D 6624 466C BB98 BDE0 F1CE

To claim this, I am signing this object:

julian7 / include-vs-cover-vs-between.rb
Created Nov 11, 2012
include? vs. cover? vs. between?
View include-vs-cover-vs-between.rb
require 'date'
require 'benchmark'
n = 1_000_000
start_date =, 01, 01)
end_date =, 03, 01)
act_date =, 02, 01) do |x|'include?') do
julian7 / 978.scss
Created Feb 7, 2011 in sass
View 978.scss
$gutter-width: 30px !default;
$grid-width: 978px !default;
$columns: 12 !default;
$column-width: ($grid-width + $gutter-width) / $columns - $gutter-width;
@mixin container {
margin-left: auto;
margin-right: auto;
width: $grid-width;
View users_controller.rb
class UsersController < ApplicationController
extend ActiveSupport::Memoizable
def index
@@index_columns ||= ['username', 'email', 'comments']
@users = User.scoped
if params[:_search] == "true"
@@index_columns.each do |param|
View .rvmrc
rvm use 1.9.2@APPNAME > /dev/null
alias god='god -p APPNAME'
# put the following line to your ~/.rvmrc if you want to have alias setting here:
# unalias god 2>/dev/null
View array_add_html_safe_join.rb
class Array
def html_safe_join(separator)
acc = self.shift
acc = acc.try(:html_safe) || acc
self.inject(acc) do |a, elem|
a << separator
a << elem
View S99_git
setopt prompt_subst
chpwd_functions=('__set_current_git_branch' ${chpwd_functions:#__set_current_git_branch})
preexec_functions=('__force_update_git_vars' ${precmd_functions:#__force_update_git_vars})
precmd_functions=('__update_git_vars' ${precmd_functions:#__update_git_vars})
function __force_update_git_vars() {
case "$1" in
# delay setting prompt until next precmd hook
View Find rubygems in ruby include stack
ike:~>>% ruby -e 'puts $".grep(/rubygems/)'
You can’t perform that action at this time.