Skip to content

Instantly share code, notes, and snippets.

View noodles-v6's full-sized avatar

noodles noodles-v6

View GitHub Profile
@ashrithr
ashrithr / kafka.md
Last active March 14, 2024 21:16
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@calebd
calebd / ArrayHelpers.swift
Last active November 4, 2022 15:17
Swift Helpers
extension Array {
func first() -> Element? {
if isEmpty {
return nil
}
return self[0]
}
func last() -> Element? {
@audreyt
audreyt / allison-osdctw-2012.md
Created April 15, 2012 12:55
IRC transcript of Allison's OSDC.tw talk

Good collaboration in open source projects

Video recording: https://www.youtube.com/watch?v=E5_tL62mUbc

Over the years, I've started thinking that participating in the open source community is like traveling on a path, toward becoming not only better programmers, but also becoming better people by working together.

You might think of it as a path toward enlightenment, growing ourselves as human beings. So what follows is really my personal philosophy which I'd like to share with you.

The first thing is this: The most important part of every open source project is the people. While code is important, the center is always the people.

淡入 一群身著制服,表情嚴肅的軍官。)

會議桌的主位上,一位資深高階 將軍 正在說話。

將軍:報告已經證實了,紐約市已經…被殭屍占領了。

上校:又來了?明明 28 天前才發生過一次殭屍入侵!

將軍:這些僵屍…不一樣。它們是… 哲學 僵屍。

@mbigatti
mbigatti / UIColor+RGB.swift
Last active February 14, 2021 07:22
UIColor extension that add a whole bunch of utility functions.
//
// UIColor+RGB.swift
// Copyright (c) 2014 Massimiliano Bigatti. All rights reserved.
//
import Foundation
import UIKit
/**
UIColor extension that add a whole bunch of utility functions like:
@akhenakh
akhenakh / gist:2894704
Created June 8, 2012 09:31
async callback from threads with Tornado
import functools
import time
import threading
import logging
import Queue
import hunspell
import tornado.web
import tornado.websocket
import tornado.locale
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@febuiles
febuiles / hubot.sh
Created November 25, 2011 22:02
Hubot startup script
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO
# tested with hbase 0.19.3 and jython 2.2.1
import java.lang
from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants
from org.apache.hadoop.hbase.client import HBaseAdmin, HTable
from org.apache.hadoop.hbase.io import BatchUpdate, Cell, RowResult
# First get a conf object. This will read in the configuration
# that is out in your hbase-*.xml files such as location of the
# hbase master node.