Skip to content

Instantly share code, notes, and snippets.

View appgurueu's full-sized avatar

Lars Müller appgurueu

View GitHub Profile
@xero
xero / irc.md
Last active March 24, 2024 02:36
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@SKempin
SKempin / Git Subtree basics.md
Last active March 19, 2024 02:57
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

'use strict';
const process = require('process');
const dgram = require('dgram');
// Command line args:
let [listenport, fwdport, fwdaddr, mindelay, maxdelay] = process.argv.slice(2);
// It will listen on <listenport> and act as a reverse proxy for the UDP service
// at <fwdaddr>:<fwdport>. All packets will be delayed by a uniformly
@tkqubo
tkqubo / html5TagSyntax.bnf
Last active September 23, 2023 22:16
EBNF notation for HTML5 tag syntax
tag-open := '<' tag-name ws* attr-list? ws* '>'
tag-empty := '<' tag-name ws* attr-list? ws* '/>'
tag-close := '</' tag-name ws* '>'
attr-list := (ws+ attr)*
attr := attr-empty | attr-unquoted | attr-single-quoted | attr-double-quoted
attr-empty := attr-name
attr-unquoted := attr-name ws* = ws* attr-unquoted-value
@belm0
belm0 / article_sc_and_lua_1.md
Last active September 21, 2023 06:37
Structured concurrency and Lua (part 1)

Structured concurrency and Lua (part 1)

John Belmonte, 2022-Sep

I've started writing a toy structured concurrency implementation for the Lua programming language. Some motivations:

  • use it as a simple introduction to structured concurrency from the perspective of Lua (this article)
  • learn the fundamental properties of structured concurrency and how to implement them
  • share code that could become the starting point for a real Lua library and framework

So what is structured concurrency? For now, I'll just say that it's a programming paradigm that makes managing concurrency (arguably the hardest problem of computer science) an order of magnitude easier in many contexts. It achieves this in ways that seem subtle to us—clearly so, since its utility didn't reach critical mass until around 2018[^sc_birth] (just as control structures like functions, if, and while weren't introduced to languages until long after the first compu

@skettler
skettler / ppa_stats.py
Created October 2, 2011 20:32 — forked from rgl/ppa_stats.py
outputs the download count of a PPA
# this outputs the download count of a PPA
#
# See https://api.launchpad.net/+apidoc/devel.html#binary_package_publishing_history
# See https://help.launchpad.net/API/launchpadlib
from launchpadlib.launchpad import Launchpad
cachedir = '/home/rgl/.launchpadlib/cache/'
launchpad = Launchpad.login_anonymously('just testing', 'production', cachedir)
@kaecy
kaecy / IRCMessageLoop.java
Last active May 5, 2022 18:54
Simple IRC Bot (Updated)
import java.io.*;
import java.net.*;
import java.util.*;
public abstract class IRCMessageLoop implements Runnable {
Socket server;
OutputStream out;
List<String> channelList;
boolean initial_setup_status;
@Jordach
Jordach / LuaTerminal.lua
Last active April 27, 2022 07:48
LuaTerminal
terminal_version = "0.1.4"
system_drive = "nil" --possibly irrelevant for UNIX systems. todo: these need to be loaded at startup
working_dir = "nil"
folder_dir = "nil"
os_name = "nil"
user_is_windows = "unsure" --until proven guilty....fact: Lua Terminal was made on windows.
-- This is the original module, 7% slower with type checks on both, 14% without type checks.
--[[
Differences from the original:
Using metatables instead of a function returning a table.
Added Vector3, Color3, Vector2, and UDim2 support.
Deprecated BrickColors.
Changed the creation method from BitBuffer.Create to BitBuffer.new.
OPTIMIZED!
Added a ::Destroy method.