Skip to content

Instantly share code, notes, and snippets.

View RGNagel's full-sized avatar
🍎

Rafael Gustavo Nagel RGNagel

🍎
  • Florianópolis, Brasil
View GitHub Profile
@RGNagel
RGNagel / bibtex.png
Created June 13, 2020 16:18 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@RGNagel
RGNagel / list.h
Created May 21, 2018 01:30 — forked from roychen/list.h
Linux kernel linked list, modified for userspace
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#include <stdio.h>
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
@RGNagel
RGNagel / MIPS-Register-Conventions.md
Created April 26, 2018 00:46 — forked from internetsadboy/MIPS-Register-Conventions.md
MIPS-Register-Conventions Cheatsheet
Name Register # Usage Preserved on call
$zero 0 The constant value 0 NA
$v0 - $v1 2 - 3 Values for results and expression evaluation F
$a0 - $a3 4 - 7 Arguments F
$t0 - $t7 8 - 15 Temporaries F
$s0 - $s7 16 - 23 Saved T
$t8 - $t9 24 - 25 More temporaries F
$gp 28 Global pointer T
$sp 29 Stack pointer T
@RGNagel
RGNagel / redshift.conf
Created December 27, 2017 12:45 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
@RGNagel
RGNagel / screen.md
Created August 19, 2017 19:31 — forked from fredrick/screen.md
GNU Screen Cheat Sheet

#GNU Screen Cheat Sheet

##Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow
@RGNagel
RGNagel / PostgresFunctionsCheatsheetReadme.md
Created August 17, 2017 16:49 — forked from dantheman213/PostgresFunctionsCheatsheetReadme.md
PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

Boiler-plate stored function

CREATE OR REPLACE FUNCTION public.sp_user_ins_status(status smallint)
  RETURNS integer
  LANGUAGE plpgsql
AS $function$
@RGNagel
RGNagel / postgres-cheatsheet.md
Created August 17, 2017 16:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@RGNagel
RGNagel / bash-cheatsheet.sh
Created August 16, 2017 02:02 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04