Skip to content

Instantly share code, notes, and snippets.

View unalkalkan's full-sized avatar

Unal Kalkan unalkalkan

View GitHub Profile
@jeremy-w
jeremy-w / Working Effectively with Legacy Code.md
Last active June 15, 2024 04:48
Notes on Michael Feathers' *Working Effectively with Legacy Code*.

Working Effectively with Legacy Code

Notes by Jeremy W. Sherman, October 2013, based on:

Feathers, Michael. Working Effectively with Legacy Code. Sixth printing, July 2007.

Foreword:

  • Software systems degrade into a mess.
  • Requirements ALWAYS change.
  • Your goal as a software developer: Create designs that tolerate change.
@paulmach
paulmach / serve.go
Last active June 20, 2024 15:14
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@Tydus
Tydus / howto-standalone-toolchain.md
Last active May 4, 2023 13:43
How to install Standalone toolchain for Android

HOWTO Cross compiling on Android

5W1H

What is NDK

NDK (Native Develop Toolkit) is a toolchain from Android official, originally for users who writes native C/C++ code as JNI library. It's not designed for compiling standalone programs (./a.out) and not compatible with automake/cmake etc.

What is Standalone Toolchain

"Standalone" refers to two meanings:

  1. The program is standalone (has nothing connect to NDK, and don't need helper scripts to run it)
  2. The toolchain is made for building standalone programs and libs, and which can used by automake etc.

(Optional) Why NDK is hard to use

By default, NDK uses android flavor directory structure when it's finding headers and libs, which is different from GNU flavor, so the compiler cannot find them. For Example:

@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing
@mickelsonm
mickelsonm / main.go
Last active February 3, 2024 18:48 — forked from manishtpatel/main.go
Golang AES Encryption/Decryption example. See running example: http://play.golang.org/p/5G-IUlYqQV
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"errors"
"io"
"log"
@serong
serong / iller.json
Created April 4, 2015 15:59
JSON formatında Türkiye'nin illeri.
{
"1": "ADANA",
"2": "ADIYAMAN",
"3": "AFYONKARAHİSAR",
"4": "AĞRI",
"5": "AMASYA",
"6": "ANKARA",
"7": "ANTALYA",
"8": "ARTVİN",
"9": "AYDIN",
@jrnickell
jrnickell / serve-static
Last active February 13, 2019 00:36
Docker Python HTTP Server
#!/usr/bin/env bash
# place in ~/bin or a PATH directory
#
# usage:
#
# $ cd /path/to/site
# $ serve-static 8443
#
# port number defaults to 8000
@tayfie
tayfie / 4chan-wget-scraping.md
Created March 14, 2017 04:36
how to scrape images from 4chan using wget

How To Scrape Images from 4chan Using Wget

This guide is to save other sorry plebs from needing to RTFM in figuring out how to use wget to scrape images from 4chan and other imageboards. There are lots of image downloaders in existence, but they are usually outdated and broken. You will save time following this guide to learn how to use a powerful and general purpose tool instead.

What Is Wget?

Wget is a command-line file downloader that can handle just about any file downloading task normal and power users will ever need to do. It has versions available for Windows, Mac, and Linux. If it is not already installed on your machine, install it now.

Basic syntax

@aprilmintacpineda
aprilmintacpineda / Using Multiple SSH keys - Beginner Friendly.md
Last active June 19, 2024 17:12
Beginner Friendly: Using Multiple SSH keys

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?