Skip to content

Instantly share code, notes, and snippets.

View dmmarmol's full-sized avatar

Diego Mármol dmmarmol

View GitHub Profile
@CarsonF
CarsonF / example.tsx
Last active November 2, 2017 05:44
Redux Form V6 typescript definition
// This doesn't have everything but it gives an idea of how the interfaces and decorator should be used.
interface LoginFormData {
username?: string;
password?: string;
}
interface LoginFormProps extends FormProps<LoginFormData, AppState> {
dispatch?: Dispatch<AppState>,
}
@onestepcreative
onestepcreative / devmode-console-helper.js
Last active October 27, 2020 19:55
Color code your console log messages with a shorter syntax to console.log and easily turn off console logging by setting a DEV_MODE variable to false.
/*
Author: Josh McDonald
Twitter: @onestepcreative
Website: joshmcdonald.net
A simple helper to log color coded messages to the
javascript console, using a shorter syntax to console.log
You can leave your dev.log() statements scattered throughout
@ElRodrigote
ElRodrigote / Colonia.md
Last active January 19, 2021 23:11
Guía util

Take into account

  • If you go there for a couple of days try to rent a room with AirBNB, is cheaper than hotels and you'll save a lot using the kitchen. Everything is really expensive in Colonia, so eating in a restaurant can be VERY expensive. I can recommend you a guy who is a developer and has an apartment for rent
  • Buy some Uruguayan pesos before going there to have pocket cash. Don't use Argentinean pesos because they will take advantage of you. Don't buy uruguayan pesos in Colonia, do it in Argentina before traveling
  • Don't withdraw Uruguayan pesos the ATM, do dollars and then if you need pesos you can sell dollars which will be much cheaper
  • Not every business will accept the Payoneer card, but those who do, you need to tell them is a prepaid or debit card. You'll be asked to enter your PIN
  • Ferries: Colonia Express is the cheapest, but their service is not as good as Buquebus. If you chose to do Buquebus buy your tickets in Seacat instead of doing it directly in BuqueBus
  • If you go for the day
@SkyBehind
SkyBehind / libinput-gestures.conf
Created September 6, 2018 19:06
My libinput config for multi-touch gestures (using Linux on Mac). I use 3-finger side swipe for forward and back, 3-finger up/down for showing all windows, and 4-finger up/down to switch desktops.
# Configuration file for libinput-gestures.
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
# maintain compatibility with original format configuration files).
@betweenbrain
betweenbrain / gist:5405671
Created April 17, 2013 16:26
Use cURL and SimpleXML to retrieve and parse Wordpress RSS feed
<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/',
CURLOPT_USERAGENT => 'spider',
CURLOPT_TIMEOUT => 120,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => TRUE,
@terkel
terkel / _decimal.scss
Last active November 23, 2023 18:36
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
@dcatanzaro
dcatanzaro / botcito_galicia.js
Last active January 26, 2024 22:36
Botcito para el Galicia
const axios = require("axios");
let lastIndexMovement = 0;
const TELEGRAM_BOTID = "";
const TELEGRAM_CHATID = "";
class Telegram {
sendTelegramMessage(message) {
const botId = TELEGRAM_BOTID;
@rosswd
rosswd / multi-git-win.md
Last active February 28, 2024 09:46
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@brod-ie
brod-ie / example.sass
Created August 19, 2013 08:45
respond-to() SASS mixin for Bootstrap 3 grid system.
.profile-pic {
float: left;
width: 250px;
@include respond-to(xs) {
width: 100%;
}
@include respond-to(sm) {
width: 125px;
}
@ghinda
ghinda / object-to-form-data.js
Last active March 30, 2024 18:51
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {