Skip to content

Instantly share code, notes, and snippets.

View dmmarmol's full-sized avatar

Diego Mármol dmmarmol

View GitHub Profile
@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;
@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).
@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>,
}
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@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) {
@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active July 2, 2023 17:33
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :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
@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
@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)