Skip to content

Instantly share code, notes, and snippets.

View aljorhythm's full-sized avatar
💻
👥

Joel Lim aljorhythm

💻
👥
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active May 8, 2024 22:55
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?
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@primaryobjects
primaryobjects / m3u8.md
Last active May 8, 2024 09:27
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active March 3, 2024 09:09
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@roryokane
roryokane / ExampleFilter.java
Created March 17, 2014 19:13
Java generic pipe and filter classes, plus examples
package pipe_foundations.example;
import pipe_foundations.Pipe;
import pipe_foundations.SimpleFilter;
public class ExampleFilter extends SimpleFilter<Integer, String> {
public ExampleFilter(Pipe<Integer> input, Pipe<String> output) {
super(input, output);
}
@ruby0x1
ruby0x1 / multi-player-html5-games-01-socket.io-server.js
Created March 27, 2012 14:59
Multi-player games in HTML5 : Setting up Socket.io on the server side
//Create and listen for clients on the existing web server
//we created above. app is the express server.
var io = require('socket.io').listen( app );
//We also introduce a UUID library, for unique identifiers.
//Not required, but I find useful.
var UUID = require('node-uuid');
/* Socket.io Configuration */
@ruby0x1
ruby0x1 / multi-player-html5-games-02-socket.io-client.html
Created March 27, 2012 14:58
Multi-player games in HTML5 : Client Side Socket.io
<!DOCTYPE html>
<html>
<head>
<title> Real time multi-player games with HTML5</title>
<style type="text/css">
html , body {
@ruby0x1
ruby0x1 / socket.io.example.js
Created February 18, 2012 23:12
socket.io + express in node.js for multiplayer games
//We will call this file server.js
var app = require('express').createServer(),
io = require('socket.io').listen(app),
url = require('url'),
pth = require('path'),
UUID = require('node-uuid');
/* Start of express/web server code. note this is just thrown here quick so you can grasp how it works. This obviously isn't good code or anything. */
@ruby0x1
ruby0x1 / ServerClass.js
Created March 27, 2012 14:54
Multi-player games in HTML5 : Server Side Server Class
var Server = Class.extend({
init : function( ) {
this.connections = [];
this.games = [];
},
addConnection : function( connection ) {