Skip to content

Instantly share code, notes, and snippets.

View heitorfm's full-sized avatar

Heitor Machado heitorfm

View GitHub Profile
@heitorfm
heitorfm / nweb23.c
Last active January 10, 2023 22:08 — forked from sumpygump/nweb23.c
nweb tiny web server written in c (from http://www.ibm.com/developerworks/systems/library/es-nweb/index.html)
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@heitorfm
heitorfm / whoami.json
Last active September 14, 2022 17:13
{"id": "981ca942451e11b01f481e3bab731a830be506b0fc641502d1fd24fba74723e8ed5694e0387d6674c42dea360fe345d2cdab413944e544b0167ce60cd79d0a34"}
@heitorfm
heitorfm / jenkins-theme.css
Last active July 15, 2020 15:10
jenkins-theme.css
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.png
git branch -m old_branch new_branch # Rename branch locally
git push origin --delete :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
mvn archetype:create
-DgroupId=[your project's group id]
-DartifactId=[your project's artifact id]
-DarchetypeArtifactId=maven-archetype-webapp
@heitorfm
heitorfm / new_gist_file.sh
Created October 17, 2013 18:55
install service on linux
http://bitnami.com/article/how-to-install-services-on-linux
@heitorfm
heitorfm / find_httpd.conf
Created July 22, 2013 19:58
Achar httpd.conf
Then simply run
$ /usr/sbin/apache2 -V
and you will get the details you need, specifically this
Server compiled with....
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
@heitorfm
heitorfm / jboss_modo_dominio
Created July 22, 2013 19:56
Configuranco Jboss em modo de dominio
http://www.mastertheboss.com/jboss-as-7/jboss-as-7-domain-configuration
http://middlewaremagic.com/jboss/?p=1900
https://docs.jboss.org/author/display/AS71/Domain+Setup
@heitorfm
heitorfm / .vimrc
Created July 22, 2013 19:46
Arquivo de configuração do VIM
" size of a hard tabstop
set tabstop=4
" size of an indent
set shiftwidth=4
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=4
@heitorfm
heitorfm / new_gist_file
Created July 22, 2013 19:38
shutdown jboss 7.1 standalone mode
$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown