Skip to content

Instantly share code, notes, and snippets.

View marcoonroad's full-sized avatar
🦋
the Future() has been CANCELLED and we .Restart() the DEAD Event[] from the past

Marco Aurélio da Silva marcoonroad

🦋
the Future() has been CANCELLED and we .Restart() the DEAD Event[] from the past
View GitHub Profile
@jessevanherk
jessevanherk / Makefile
Last active October 25, 2018 03:23
A sample makefile and support files to build a love2d game for multiple platforms from linux
LOVE_BIN=/usr/bin/love
LOVE_DIR=./src/love
DIST_DIR=./src/dist
PATCH_DIR=./src/patch
BUILD_DIR=./build
BIN_DIR=./bin
LOVE_VERSION=0.9.1
GAME_NAME=MySampleGame
PRETTY_NAME=My Sample Game
#!/bin/bash
echo ECS_CLUSTER=your_ecs_cluser_name > /etc/ecs/ecs.config
INSTANCE=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
hostname $INSTANCE
sed -i.bak "s/\\(HOSTNAME=\\).*/\\1$INSTANCE/" /etc/sysconfig/network
# https://aws.amazon.com/blogs/compute/using-amazon-efs-to-persist-data-from-amazon-ecs-containers/
yum -y install jq
@cure53
cure53 / scriptlet.md
Last active February 1, 2024 19:33
The Scriptless Scriptlet - Or how to execute JavaScript from CSS in MSIE11 without using Scripts

The Scriptless Scriptlet

Or how to execute JavaScript from CSS in MSIE11 without using Scripts

Stop! This text is only interesting for you if you...

  • Like popping alerts in weird situations
  • Miss CSS expressions as much as we do
  • Have an unhealthy obsession for markup porn

Introduction

@0mkara
0mkara / Ethereum_private_network.md
Last active March 30, 2025 21:48
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@marcoonroad
marcoonroad / rectypes.eff.ml
Last active September 26, 2020 16:29
Example of fold/unfold operations...
(* type-level recursion with fold/unfold *)
(* $ eff --effects -l rectypes.eff *)
(* there's an unique isomorphism between fold and unfold such that:
fold :: ...1 Unfix (...2 Fix (func) ...3) ...4 <=> ...1 Fix (func) ...4 :: unfold
where func = \fix -> ...2 fix ...3
so, conceptually:
@col
col / setup_elixir_app_on_travis_ci.md
Last active July 4, 2020 17:46
Configure Elixir app on Travis CI

Configure Elixir app on Travis CI

Setup Build

  1. Create .travis.yml file in the base dir
  2. Enter the following content:
language: elixir
elixir:
 - 1.2
@o3bvv
o3bvv / console
Last active September 6, 2023 04:05
SSSHHH! Testing Python SSH client with auth via private key
# Install our dependencies
$ pip install -r <(wget -O- http://bit.ly/ssh_test_requirements)
# Generate key pair without password
$ ssh-keygen -t rsa -C "user@unicorn"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/alex/.ssh/id_rsa): user.key
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
@jschoch
jschoch / stuff.ex
Created April 9, 2015 14:22
struct encoding and decoding nested structs with poison
defmodule MyTime do
defstruct stamp: {0,0,0}
defimpl Poison.Encoder, for: MyTime do
def encode(%MyTime{} = t,options) do
list = Tuple.to_list(t.stamp)
Poison.Encoder.Map.encode(%MyTime{stamp: list},options)
end
end
defimpl Poison.Decoder, for: MyTime do
def decode(s,options) do
@mark-adams
mark-adams / aes_example.cs
Created December 12, 2014 15:02
AES String Encryption (CBC) Example Code for C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace aes_example
{
using System;
@caseywatts
caseywatts / bookmarkleting.md
Last active May 20, 2025 19:58
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.