Skip to content

Instantly share code, notes, and snippets.

View hrnn's full-sized avatar

Hernan Payrumani hrnn

View GitHub Profile
@barosl
barosl / add.c
Created July 26, 2015 07:26
Function overloading in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int addi(int a, int b) {
return a + b;
}
char *adds(char *a, char *b) {
char *res = malloc(strlen(a) + strlen(b) + 1);
@jendiamond
jendiamond / Java_4th_Edition_Tony Gaddis_Notes.md
Last active August 24, 2022 22:01
Starting Out with Java 4th Edition - Tony Gaddis

Starting Out with Java 4th Edition - Tony Gaddis

Primitive data types - you use these data types to create variables which are storage locations in the computer's memory - they have no other built in capability other than storing a value.
byte short int long char float double boolean

Chapter 4

Increment & Decrement

postfix mode - number++;

@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active March 14, 2026 06:58
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@mbektchiev
mbektchiev / GitHubApiCommands
Last active March 19, 2019 19:45
Recover forced/deleted branches
// events per repo:
curl https://api.github.com/repos/Icenium/Ice/events?page=1 -u mbektchiev
// events per user:
curl https://api.github.com/users/mbektchiev/events?page=1 -u mbektchiev
// Create a new branch pointing at specified commit SHA:
curl -i -X POST https://api.github.com/repos/Icenium/Ice/git/refs -u mbektchiev -H "Content-Type: application/json" -d '{"ref":"refs/heads/bektchiev/recover2", "sha":"08b58ffdfc4fa57afad636dadc44692fe26fdc76"}'
@1um
1um / gist:04592610fad7a90a3514
Last active March 12, 2016 06:46
Install Ejudge 3.1.0 on Ubuntu 14.04.01

#Установка Ejudge 3.1.0 на Ubuntu 14.04.01

Используемые версии
  • ejudge-3.1.0
  • ubuntu - 14.04 (32b)
Необходимые пакеты:

sudo apt-get update

@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@staltz
staltz / introrx.md
Last active May 24, 2026 14:25
The introduction to Reactive Programming you've been missing
@kracekumar
kracekumar / Writing better python code.md
Last active May 15, 2026 06:40
Talk I gave at June bangpypers meetup.

Writing better python code


Swapping variables

Bad code