Skip to content

Instantly share code, notes, and snippets.

View eliukblau's full-sized avatar

Eliuk Blau eliukblau

  • CreepyPanda Software
  • Santiago, Chile
View GitHub Profile
@eliukblau
eliukblau / bashrc
Last active May 11, 2017 00:12
PIXterm Splash Bash Function (bashrc)
# PIXTERM SPLASH
function pixterm_splash() {
if [[ -n "$(which pixterm)" && -d "$HOME/.pixterm_splash" ]]; then
local image=$(cd "$HOME/.pixterm_splash"; ls | while read x; do echo "$RANDOM:$x"; done | sort -n | cut -d':' -f2 | tail -1)
pixterm -m 1b0606 "$HOME/.pixterm_splash/$image"
fi
}
export -f pixterm_splash
pixterm_splash
interface IDescribible {
void Describirme();
}
class Persona {
public String nombre;
public Persona(String nombre) {
this.nombre = nombre;
}
@eliukblau
eliukblau / main.hx
Created August 6, 2016 11:00 — forked from EduardoLopes/main.hx
Luxe Pixel Perfect camera scale
override function onwindowsized( e:WindowEvent ):Void {
zoomRatio.x = Math.floor(Luxe.screen.w / gameResolution.x);
zoomRatio.y = Math.floor(Luxe.screen.h / gameResolution.y);
//get the smallest zoom ratio between zoomRatio.x and zoomRatio.y, and limit it to be greater or equal 1
zoom = Math.floor(Math.max(1, Math.min(zoomRatio.x, zoomRatio.y)));
var width = gameResolution.x * zoom;
var height = gameResolution.y * zoom;
@eliukblau
eliukblau / init.ts
Last active August 6, 2016 05:38
khamake init.ts optimizations (eliuk)
import * as fs from 'fs';
import * as path from 'path';
export function run(name: string, from: string, projectfile: string) {
if (!fs.existsSync(path.join(from, projectfile))) {
fs.writeFileSync(path.join(from, projectfile),
"let project = new Project('New Project');\n"
+ "project.addAssets('Assets/**');\n"
+ "project.addSources('Sources');\n"
+ "resolve(project);\n",
@eliukblau
eliukblau / 1readme.md
Created April 22, 2016 08:47 — forked from akimboyko/1readme.md
ScriptCs as embedded scripting engine for .Net application with NuGet support

ScriptCs as embedded scripting engine for .Net application with NuGet support

This gist contains:

  • ExecuteScriptCs.cs — class that are able to execute ScriptCs from another .Net application
  • ScriptModule.cs — AutoFac configuration for ScriptCs/NuGet dependencies
  • Program.cs — command-line example
  • Sample.csx — sample ScriptCs script
  • packages.config — NuGet packages configuration
@eliukblau
eliukblau / Readme.md
Last active August 29, 2015 14:19 — forked from killercup/Readme.md
// Copyright (c) 2010, 2012 Matt Enright
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
@eliukblau
eliukblau / twitterer.lua
Last active August 29, 2015 14:15 — forked from y2bd/twitterer.lua
local tweet, map, appendparam, encode
local Twitterer = setmetatable({tweet=tweet}, {__call = function(t, params) return tweet(params) end})
tweet = function(params)
text = params[1] or params.text or nil
url = params[2] or params.url or nil
via = params[3] or params.via or nil
hashtags = params[4] or params.hashtags or nil
related = params[5] or params.related or nil
@eliukblau
eliukblau / hack.sh
Last active August 29, 2015 14:14 — forked from clowder/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
package main
import "fmt"
type Withable interface {
Enter() error
Leave()
}
func with(w Withable, f func(w Withable) error) (err error) {