Skip to content

Instantly share code, notes, and snippets.

View voldyman's full-sized avatar

Akshay Shekher voldyman

View GitHub Profile
@Low-power
Low-power / chatproxy.c
Last active May 2, 2020 02:26
Chatroom proxy for SSHOUT and ssh-chat revision 24
/* Chatroom relay between SSHOUT and ssh-chat
* Copyright 2015-2020 Rivoreo
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@shaan7
shaan7 / windows_build.sh
Created February 23, 2016 07:44
Build script for Qt-based App using Visual Studio 12.0
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
set QT_PATH=C:\Qt
set QT_TOOLS_PATH=%QT_PATH%\Tools
set QT_MSVC_PATH=%QT_PATH%\5.5\msvc2013
set QT_MSVC_BIN=%QT_MSVC_PATH%\bin
set PATH=%PATH%;%QT_MSVC_BIN%
echo Building
%QT_MSVC_BIN%\qmake CONFIG+="release" || exit /b
@vasanthk
vasanthk / System Design.md
Last active July 18, 2024 00:52
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@captn3m0
captn3m0 / README.md
Last active October 28, 2015 11:09
Bug Bounty for Homeopathy

Introduction

This is a public document offering a monetary bounty to writers who are willing to write a piece on Homeopathy in India. The bounty money is yours to keep. If you do not wish to keep it, I'll donate it to a charity of your choice.

Why

Welcome Cure is an Indian homeopathy startup that raised $6 million recently. I don't think that investors in India should be trusting their money with something that doesn't work and plays with the public's health. Consider this bounty as an incentive to do something about it.

@voldyman
voldyman / DataTime.go
Created July 9, 2014 12:27
The launchpad API provides date in a weird format, this code parses that date-time
package main
import (
"fmt"
"time"
"reflect"
)
func main() {
test, err := time.Parse( "2006-01-02T15:04:5-07:00", "2014-06-02T16:26:28.514048+00:00")
@dixson3
dixson3 / workspace.sh
Created January 10, 2014 19:11
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
@jboner
jboner / latency.txt
Last active July 17, 2024 03:12
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@geoffyoungs
geoffyoungs / pack-cell-renderers.rb
Created September 21, 2011 08:06
Include multiple CellRenderers in a single TreeView column
#!/usr/bin/env ruby
# See http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3ATreeViewColumn
# for more details on Gtk::TreeViewColumn
require 'gtk2'
require 'base64'
win = Gtk::Window.new("Multiple cells in a column")
win.signal_connect('delete-event') { Gtk.main_quit }