Skip to content

Instantly share code, notes, and snippets.

View mvrozanti's full-sized avatar

Marcelo mvrozanti

View GitHub Profile
@laobubu
laobubu / ABOUT.md
Last active March 12, 2025 21:04
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active August 27, 2024 08:46
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(int argc, char *argv[])
{
unsigned long value;
char *terminatedAt;
@tyuiko
tyuiko / argparsecheetsheet.py
Created April 19, 2016 16:40
argparse cheat sheet
import argparse
parser = argparse.ArgumentParser()
### Positional
parser.add_argument('positional1')
parser.add_argument('positional2', help="positional argument 2")
parser.add_argument('positional3', help="positional argument 3 type int", type=int)
### Optional
parser.add_argument("--optional1", help="optional argument 1")
parser.add_argument("--optional2", help="optional argument 2", action="store_true")
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
Include file (Java)
<%@ include file="/WEB-INF/jsp/common/date.jsp" %>
Include file (JSP)
<jsp:include page="/WEB-INF/jsp/common/date.jsp">
@mogproject
mogproject / PythonUnitTestCheatSheet.md
Created July 24, 2015 11:17
Python unittest Cheat Sheet

Python unittest Cheat Sheet

Skeleton

@mrw34
mrw34 / gist:b12531d1a8df25f6c170
Last active May 21, 2024 10:47
Trello JSON to CSV conversion using jq
jq -r '["List", "Card"], ((reduce .lists[] as $list ({}; .[$list.id] = $list.name)) as $lists | .cards[] | select(.closed != true) | [$lists[.idList],.name]) | @csv' <nw3RUeLl.json
@magnetikonline
magnetikonline / README.md
Last active November 10, 2024 19:59
Bash getopts template.

Bash getopts template

#!/bin/bash -e

function usage {
	cat &lt;&amp;2
@maurobaraldi
maurobaraldi / bovespa_intraday.py
Last active March 20, 2025 20:19
Cotações da Bovespa Intraday
#!/usr/bin/env python
from datetime import datetime
from json import loads
from time import gmtime, mktime, strptime
# LevelDict é um wrapper usando dicionário para LevelDB
# https://github.com/maurobaraldi/leveldict
from leveldict import LevelJsonDict
from requests import get
@xero
xero / irc.md
Last active April 17, 2025 15:44
irc cheat sheet