Skip to content

Instantly share code, notes, and snippets.

@Gydo194
Gydo194 / args.asm
Last active November 3, 2024 20:54
Command Line arguments in NASM assembly on 64-bit Linux
; print all command line arguments (5 characters) and exit
; for 64-bit systems, Linux syscalls
; for simplicity, this program does not calculate the length of the strings.
; assemble with: nasm -f elf64 -o args args.asm
; link with: ld -o args args.o
sys_write equ 1 ; the linux WRITE syscall
sys_exit equ 60 ; the linux EXIT syscall
sys_stdout equ 1 ; the file descriptor for standard output (to print/write to)
@sandren
sandren / tailwind.md
Last active October 12, 2024 17:10
Tailwind CSS best practices

Tailwind CSS best practices

Utility classes

  1. When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!

  2. Always use fewer utility classes when possible. For example, use mx-2 instead of ml-2 mr-2 and don't be afraid to use the simpler p-4 lg:pt-8 instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4.

  3. Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center instead of block lg:flex flex-col justify-center to make it very clear that the flexbox utilities are only applicable at the

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@joseph-montanez
joseph-montanez / json.asp
Created March 2, 2012 08:52
A basic jsonrpc server and client. The client is in ASP and the server is in PHP
<script language="JScript" runat="server">
var JSON;
if (!JSON) {
JSON = {};
}
(function () {
'use strict';
function f(n) {
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough [email protected]
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/