Skip to content

Instantly share code, notes, and snippets.

View kjellski's full-sized avatar
🤓
learning every day...

Kjellski kjellski

🤓
learning every day...
View GitHub Profile
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@soheilhy
soheilhy / nginxproxy.md
Last active May 7, 2024 14:55
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@Virtlink
Virtlink / TypeSwitch.cs
Last active March 9, 2019 17:11
Switch on type. The order of the Case() methods is important.
using System;
namespace Virtlink
{
/// <summary>
/// Executes a particular piece of code based on the type of the argument.
/// </summary>
/// <example>
/// Usage example:
/// <code>
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@xplicit
xplicit / monodevelop.sh
Last active December 24, 2015 10:29
Compile and install current dev version of Mono (3.4.1) and Monodevelop (5.1) on Ubuntu
#!/bin/sh
sudo apt-get install git mono-mcs mono-gmcs autoconf libtool g++ libglib2.0-cil-dev libgtk2.0-cil-dev libglade2.0-cil-dev libgnome2.0-cil-dev libgconf2.0-cil-dev
mkdir mono
cd mono
git clone https://github.com/mono/mono.git
git clone https://github.com/mono/monodevelop.git
git clone https://github.com/mono/xsp.git
git clone https://github.com/mono/mono-addins.git
cd mono
@funkotron
funkotron / docker_create_treeio.sh
Last active December 18, 2019 17:56
Using Docker (requires docker to be installed http://www.docker.io/gettingstarted/ ), spawn a postgresql instance and a dynamically configured treeio instance.
#!/bin/bash
# Description: Using Docker (requires docker to be installed http://www.docker.io/gettingstarted/ ), spawn a postgresql instance and a dynamically configured treeio instance
# Also requires postgresql client tools http://www.postgresql.org/download/linux/ubuntu/
# Run chmod +x to make this file executable then run it: ./docker_create_treeio.sh
# Author: Adam Awan
# Email: adam@tree.io
# Set the port to forward for Tree.io
TREEIO_PORT="80"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@mrchief
mrchief / LICENSE.md
Last active March 23, 2024 12:28
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@gigamonkey
gigamonkey / FizzBuzz.scala
Created May 14, 2013 20:21
I don't always write FizzBuzzes, but when I do, I do it without modulus.
object FizzBuzz extends App {
val nones = Stream.continually(None)
val fizzes: Stream[Option[String]] = nones.take(2) ++ Some("Fizz") #:: fizzes
val buzzes: Stream[Option[String]] = nones.take(4) ++ Some("Buzz") #:: buzzes
for (((fizz, buzz), n) <- fizzes zip buzzes zip (1 to 100)) {
println(fizz.map(_ + buzz.getOrElse("")).orElse(buzz).getOrElse(n))
}