Skip to content

Instantly share code, notes, and snippets.

View brunomrpx's full-sized avatar

Bruno Mayer Paixão brunomrpx

  • Azion
  • Tramandaí/RS
View GitHub Profile
@PCreations
PCreations / rxjs-diagrams.md
Last active September 26, 2024 01:44
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@zwh8800
zwh8800 / datetime.lua
Last active August 30, 2024 12:16
lua ISO 8601 datetime parser - https://repl.it/IQuI/5
function parse_json_date(json_date)
local pattern = "(%d+)%-(%d+)%-(%d+)%a(%d+)%:(%d+)%:([%d%.]+)([Z%+%-])(%d?%d?)%:?(%d?%d?)"
local year, month, day, hour, minute,
seconds, offsetsign, offsethour, offsetmin = json_date:match(pattern)
local timestamp = os.time{year = year, month = month,
day = day, hour = hour, min = minute, sec = seconds}
local offset = 0
if offsetsign ~= 'Z' then
offset = tonumber(offsethour) * 60 + tonumber(offsetmin)
if xoffset == "-" then offset = offset * -1 end
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active May 8, 2025 19:22
tmux Cheat Sheet
@Manduro
Manduro / keyboard-attach.directive.ts
Last active August 24, 2020 06:50
Ionic Keyboard Attach Directive
import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';
import { Keyboard } from '@ionic-native/keyboard';
import { Content, Platform } from 'ionic-angular';
import { Subscription } from 'rxjs/Subscription';
/**
* @name KeyboardAttachDirective
* @source https://gist.github.com/Manduro/bc121fd39f21558df2a952b39e907754
* @description
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

#include <stdio.h>
#include <string.h>
int main(){
printf("%s.%d\n",__FUNCTION__,__LINE__);
char pkg_code[6] = {"20gb"};
char unity[10];
char volume[10];
memset(unity,'\0',sizeof(unity));
@brunomrpx
brunomrpx / ajax.js
Last active December 3, 2015 00:44
Simple object to make Ajax requests
var ajax = (function() {
'use strict';
var xmlHttpRequest;
var states = {
UNSET: 0,
OPENED: 1,
HEADERS_RECEIVED: 2,
LOADING: 3,

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@cassiocardoso
cassiocardoso / select-estados-br
Created February 12, 2014 23:31
Select com uma lista de todos os estados brasileiros.
<select name="estados-brasil">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>