Skip to content

Instantly share code, notes, and snippets.

View guitmz's full-sized avatar

Guilherme Thomazi Bonicontro guitmz

View GitHub Profile
@redinger
redinger / Emacs.md
Created November 26, 2011 03:22
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

@warabanshi
warabanshi / elf64-bss.asm
Last active March 8, 2023 18:33
ELF sample6 bss division
BITS 64
org 0x08048000
ehdr: ; ELF64_Ehdr(ELF header)
db 0x7f, "ELF", 2, 1, 1 ; e_ident
times 9 db 0 ; e_ident
dw 2 ; u16 e_type
dw 0x3e ; u16 e_machine /usr/include/linux/elf-em.h
; 62 = x86-64
dd 0x01 ; u32 e_version
anonymous
anonymous / readme
Created September 24, 2014 09:49
r/dailyprogrammer Challenge #180
[9/17/2014] Challenge #180 [Intermediate] Tamagotchi emulator
http://www.reddit.com/r/dailyprogrammer/comments/2gryun/
Only for windows x64
compile this with:
nasm -f win64 t_main.asm
nasm -f win64 t_pet.asm
nasm -f win64 t_random.asm
@jamichaels
jamichaels / 64bitprintfintTut
Last active July 25, 2019 13:23
Printing an integer to stdout with printf in 64-bit NASM (Linux)
Printing an integer to stdout with printf in 64-bit NASM (Linux)
While doing some debugging, I found myself wanting to print an address to the screen, and it
took me forever to piece together how to do it from several tutorials.
The main things you need to know are
1) use 'main:' as a label and not '_start:' - because you are calling libc, it won't work without main.
2) compile or link with -lc (that's short for libc).
3) declare printf as extern
4) zero the vector registers (put 0 into rax). I don't know why, but apparently you are supposed to.
@jamichaels
jamichaels / Getdents.old.att.syntax
Created April 24, 2015 01:14
An article on getting directory structs with getdents() in at&t asm I wrote in May of 2000.
#!/home/sblip/article.2
using the getdents(2) Linux syscall to read directory entries from disk.
This article assumes basic knowledge of at&t syntax assembly, and basic
understanding of how to make system calls in linux through int 0x80h.

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@adham90
adham90 / spacemacs-keybindings
Last active April 5, 2024 14:24
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@mhubig
mhubig / Dockerfile
Last active November 3, 2023 03:42
Alpine Linux based cronjob runner
FROM alpine:latest
RUN apk add --update php python py-pip mysql-client \
&& pip install awscli \
&& rm -rf /var/cache/apk/*
RUN touch crontab.tmp \
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \
&& crontab crontab.tmp \
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no