Skip to content

Instantly share code, notes, and snippets.

<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="text_print" id="IX@!wOPTRH{cg@)GwO)~" x="138" y="63">
<value name="TEXT">
<shadow type="text" id="0xZ6]FJM=h==!vmuwRc0">
<field name="TEXT">Repeat statement</field>
</shadow>
</value>
<next>
<block type="controls_repeat_ext" id="=QnI.mK=m!`%eY)T,/xn">
<value name="TIMES">
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="controls_if" id="Cl;=n-9N5#itY)ol]^vn" x="113" y="213">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="f-0|pb()3NlFw(*e)H}]">
<field name="OP">LTE</field>
<value name="A">
<block type="math_number" id="Eld=+eF]T(Y5JffZpBO=">
<field name="NUM">13</field>
</block>
# Git Aliases
alias ga="git add . && git status"
alias gu="git add -u . && git status"
alias gc="git commit -m"
alias gs="git status"
alias mine="git checkout --ours -- "
alias theirs="git checkout --theirs -- "
alias gfuck="git reset --hard && git clean -fd"
# Helper Functions
@edgarjcfn
edgarjcfn / gist:29791f0bda934c7a3b10
Last active August 29, 2015 14:05
Setting up Cocos2D-js
  • Checkout Cocos2D-js Repository
  • Update all submodules
  • Navigate to frameworks/js-bindings/cocos2dx
  • Update all submodules here too
  • Still in this folder, run download_deps.py
  • Go back to root of cocos2dx
  • run ./setup.py
// pin numbers:
const int button = 2;
const int green = 9;
const int yellow = 10;
const int red = 11;
// constants
#define SECS_PER_HOUR (3600UL)
#define SECS_PER_DAY (SECS_PER_HOUR * 24L)
#define MILLIS_PER_DAY (SECS_PER_DAY * 1000L);
@edgarjcfn
edgarjcfn / WeightedRandomizer.cs
Last active December 16, 2021 23:48
A Weighted Randomizer in C#. The class is built in a way to be used in a very readable manner. Check comments for example.
/// <summary>
/// Static class to improve readability
/// Example:
/// <code>
/// var selected = WeightedRandomizer.From(weights).TakeOne();
/// </code>
///
/// </summary>
public static class WeightedRandomizer
{
@edgarjcfn
edgarjcfn / producteev_to_evernote.py
Created May 22, 2013 13:15
Python script to convert Producteev exported files (.CSV) to Evernote Archived Notes (.ENEX)
#!/usr/bin/python
# -*- coding: utf8 -*-
import sys
def producteev_to_evernote (csv_file, enex_file):
# Convert Producteev .CSV file to Evernote .ENEX format
# Based on Phat2Enex file from http://pastebin.com/jq8NRhsG
# csv file must be in UTF-8 encoding
import csv