Skip to content

Instantly share code, notes, and snippets.

View leoetlino's full-sized avatar
💭
I may be slow to respond. Busy with coursework

Léo Lam leoetlino

💭
I may be slow to respond. Busy with coursework
View GitHub Profile
@idbrii
idbrii / botw-cedec2017.md
Last active May 7, 2024 13:54
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@jkhsjdhjs
jkhsjdhjs / online-net_systemd-network-configuration.md
Last active December 16, 2022 19:53
online.net: systemd Network Configuration with (r)DNS

online.net: systemd Network Configuration with (r)DNS

Introduction

This document will guide you through the process of setting up your online.net network addresses, DNS servers and rDNS records. For IPv4 we will use systemd-networkd (part of systemd) and odhcp6c (OpenWrt embedded DHCPv6-client) together with iproute2 for IPv6. For DNS we'll use systemd-resolved.

systemd is the default init process on Arch Linux, Debian GNU/Linux, Fedora, Ubuntu and more. iproute2 is also preinstalled there. So, if you're using a distribution that uses systemd, this tutorial should work for you. If you're using Gentoo Linux first make sure that you're using systemd.

Table of Contents

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 3, 2024 11:35
Hyperlinks in Terminal Emulators
[merge "clang_format"]
name = clang-format merge driver
driver = /tmp/merge_driver.sh %O %A %B %L %P
recursive = binary
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@beeftornado
beeftornado / byobu-persist.rb
Last active May 17, 2022 18:46
Save byobu (a tmux wrapper) sessions to a shell script that can be run to restore the session.
#!/usr/bin/env ruby
# Modified version of https://github.com/geebee/tmux-persistence to work with byobu
# and work on OSX.
require 'fileutils.rb'
# Start - Configuration Variables
sessionDir = ENV['HOME']+"/.byobu-sessions"
maxStoredSessions = 5
@nielsmouthaan
nielsmouthaan / MenuBuilder.php
Created September 22, 2012 10:21
Custom KnpMenuBundle navigation bar twig template to support Font Awesome icons & Twitter bootstrap lay-out
<?php
namespace Acme\HelloBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)