Skip to content

Instantly share code, notes, and snippets.

Avatar
💡
Developing

Lars Müller appgurueu

💡
Developing
View GitHub Profile
View FastBitBufferV1.lua
-- 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.
View crapnet.js
'use strict';
const process = require('process');
const dgram = require('dgram');
let [listenport, fwdport, fwdaddr, mindelay, maxdelay] = process.argv.slice(2);
listenport = listenport || 30001;
fwdport = fwdport || 30000;
fwdaddr = fwdaddr || '127.0.0.1';
mindelay = mindelay || 400;
@kaecy
kaecy / IRCMessageLoop.java
Last active May 5, 2022
Simple IRC Bot (Updated)
View IRCMessageLoop.java
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;
View Git Subtree basics.md

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:

@xero
xero / irc.md
Last active Jul 2, 2022
irc cheat sheet
View irc.md

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.
View LuaTerminal.lua
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.
@tkqubo
tkqubo / html5TagSyntax.bnf
Created May 31, 2012
EBNF notation for HTML5 tag syntax
View html5TagSyntax.bnf
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
@lancejpollard
lancejpollard / meta-tags.md
Created Mar 5, 2012
Complete List of HTML Meta Tags
View meta-tags.md
@skettler
skettler / ppa_stats.py
Created Oct 2, 2011 — forked from rgl/ppa_stats.py
outputs the download count of a PPA
View ppa_stats.py
# 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)