This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php. | |
Example: | |
ProFi = require 'ProFi' | |
ProFi:start() | |
some_function() | |
another_function() | |
coroutine.resume( some_coroutine ) | |
ProFi:stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mapwacom script | |
MAPWACOM=$(basename $0) | |
EXIT_CODE_BAD_DEVICE=82 | |
EXIT_CODE_NO_SUCH_DEVICE=80 | |
EXIT_CODE_NO_SUCH_SCREEN=81 | |
EXIT_CODE_MISSING_DEPS=83 | |
EXIT_CODE_USAGE=64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local prefix = ... and (...):match '(.-%.?)[^%.]+$' or '' | |
print( prefix ) | |
--preserves last dot | |
--possible improvement: get module separator from package.config, usually not needed | |
--[[examples | |
require 'module.submodule' | |
module. | |
require 'long.path.to.submodule' | |
long.path.to. | |
dofile 'module.lua' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cargo-deps: hsl, image, csv = "1.0.0-beta.4", serde, serde_derive | |
// ~~~ PUBLIC DOMAIN ~~~ | |
// I, the copyright holder of this work, hereby release it | |
// into the public domain. This applies worldwide. | |
// In case this is not legally possible, I grant any entity | |
// the right to use this work for any purpose, without any | |
// conditions, unless such conditions are required by law. | |
extern crate csv; |