Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Maumagnaguagno's full-sized avatar
〽️
Curiouser and curiouser!

Mau Magnaguagno Maumagnaguagno

〽️
Curiouser and curiouser!
View GitHub Profile

Ace

Ace PDDL

define(function(require, exports, module) {
  "use strict";
  var oop = require("../lib/oop");
  var PDDLHighlightRules = function() {
 var keywordMapper = this.createKeywordMapper({
@Maumagnaguagno
Maumagnaguagno / .travis.yml
Last active February 18, 2020 00:02
Make Travis-CI push files to other repositories for you when tests pass
language: ruby
rvm:
- 2.0.0
env:
global:
- USER="username"
- EMAIL="username@mail.com"
- REPO="name of target repo"
- FILES="README.md foo.txt bar.txt"
- GH_REPO="github.com/${USER}/${REPO}.git"
# Based on https://eregon.me/blog/2018/02/11/trick-sudoku.html
S = <<PUZZLE.lines.map { |l| l.chomp.chars.map(&:to_i)}
19___8__5
__2_5__89
8_674____
_____4_92
_23_7_81_
56_8_____
____279_3
93__8_1__
# Based on http://www.graphviz.org/content/generate-directory-tree-dot
def treedot(tree)
nodes = Hash.new {|h,k| h[k] = "node#{h.size}"}
dot = 'digraph tree{
fixedsize=true
splines=ortho
node [style="rounded,filled", fillcolor="#E5E5E5", concentrate=true]'
tree.each {|name,subtree| add(dot, name, subtree, nodes)}
dot << "\n}"
end
@Maumagnaguagno
Maumagnaguagno / char_tester.rb
Created August 1, 2017 13:17
Test integer to char in Ruby
#encoding: ascii-8bit
puts [
# ...
33.chr == '!',
34.chr == '"',
35.chr == '#',
36.chr == '$',
37.chr == '%',
38.chr == '&',
39.chr == "'",
@Maumagnaguagno
Maumagnaguagno / Greasemonkey_Emojis.js
Last active July 21, 2017 19:16
Github old css copy and patch to avoid changes made to fonts in July 11(2016) and dark header in February 11(2017) using Stylish
// ==UserScript==
// @name Emojis
// ==/UserScript==
window.addEventListener('load', function() {
var emojis = document.getElementsByClassName("emoji")
//console.log("Emojis:")
//console.log(logos.length)
for(var i = 0; i < emojis.length; ++i)
{
@Maumagnaguagno
Maumagnaguagno / planning.domains.py
Last active July 11, 2017 03:16
Scripts to request solver from planning.domains
#!/usr/bin/env python
# More info at http://solver.planning.domains/
import urllib2, json, sys
HELP = """planning.domains.py
Usage:
planning.domains.py domain.pddl problem.pddl [mode=save|compare plan]
Options
mode - specify if it saves to or compares with plan file
@Maumagnaguagno
Maumagnaguagno / assistant.rb
Last active May 6, 2017 13:18
Assistant - Execute basic Ruby .travis.yml files locally
require 'yaml'
module Assistant
extend self
def test(filename)
data = YAML.load_file(filename)
case data['language']
when 'ruby' then test_ruby(data)
else puts "Language #{data['language']} is unknown"
@Maumagnaguagno
Maumagnaguagno / README.md
Last active November 10, 2016 05:30
Optimizing C to know ranges