Skip to content

Instantly share code, notes, and snippets.

View haosdent's full-sized avatar
:octocat:

haosdent haosdent

:octocat:
View GitHub Profile
namespace SimpleConsole
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main()
anonymous
anonymous / gist:3014636
Created June 28, 2012 23:11
Pen type a
Project Update #27: The Storm
For backers only, Posted by cw&t
Hi backers!
First, for those of you still waiting for your pen(s), we're still on schedule. The schedule was posted a few updates ago (update #22). The 3 remaining batches are shipped from our manufacturer in China on
July 7th (480 pens)
July 23rd (480)
August 7th (494)
@rednaxelafx
rednaxelafx / PrintOptoAssembly
Created November 1, 2012 08:20
Log from running example in Item 66 of Effective Java 2nd on JDK6u25-fastdebug-amd64
{method}
- klass: {other class}
- this oop: 0x00000000bc925718
- method holder: 'StopThread$1'
- constants: 0x00000000bc925430 constant pool [29] for 'StopThread$1' cache=0x00000000bc925a90
- access: 0xc1000001 public
- name: 'run'
- signature: '()V'
- max stack: 1
- max locals: 2
@haosdent
haosdent / pass_cude_system_auth.sh
Created November 7, 2012 18:07
Pass the auth of cude system auth.
#!/usr/bin/env sh
origin=`curl -i http://202.116.160.166 | egrep '(Cookie)|(VIEW)' --color`
session=`echo $origin | perl -n -e '/SessionId=(\S+);/ && print $1'`
viewstate=`echo $origin | perl -n -e '/value="(\S+)"/ && print $1'`
cookie="Cookie:ASP.NET_SessionId="$session
agent="User-Agent:python/gevent-http-client-1.0a"
curl -H $cookie http://202.116.160.166/CheckCode.aspx > /tmp/test.gif
/*
* linux 2.6.37-3.x.x x86_64, ~100 LOC
* gcc-4.6 -O2 semtex.c && ./a.out
* 2010 sd@fucksheep.org, salut!
*
* update may 2013:
* seems like centos 2.6.32 backported the perf bug, lol.
* jewgold to 115T6jzGrVMgQ2Nt1Wnua7Ch1EuL9WXT2g if you insist.
*/
@joyrexus
joyrexus / README.md
Last active June 8, 2024 00:43
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

@debasishg
debasishg / gist:8172796
Last active July 5, 2024 11:53
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@datagrok
datagrok / README.md
Last active June 6, 2021 14:23
Circular imports in Python 2 and Python 3: when are they fatal? When do they work?
@niun
niun / root-ro
Last active June 27, 2024 14:06
Read-only Root-FS with overlayfs for Raspian
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10.
# This version can be found here:
# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs