Skip to content

Instantly share code, notes, and snippets.

View nmarley's full-sized avatar
🦀
我想吃一點點東西。

Nathan Marley nmarley

🦀
我想吃一點點東西。
View GitHub Profile
@manuelmeurer
manuelmeurer / swap.yml
Created June 30, 2015 09:29
Ansible role for creating a Swap file
- name: set swap_file variable
set_fact:
swap_file: /mnt/{{ swap_space }}.swap
- name: check if swap file exists
stat:
path: "{{ swap_file }}"
register: swap_file_check
- name: create swap file
@FiloSottile
FiloSottile / 32.asm
Last active March 23, 2024 12:28
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@diegok
diegok / mojo_ua_gzip.pl
Created October 10, 2011 01:09
Mojo::UserAgent with gzip support
#!/usr/bin/env perl
use 5.12.0;
use Mojo::UserAgent;
use Compress::Zlib;
my $ua = Mojo::UserAgent->new;
$ua->on( start => sub {
my ( $ua, $tx ) = @_;