Skip to content

Instantly share code, notes, and snippets.

@malfario
malfario / gist:1031248
Created June 17, 2011 11:27 — forked from alienscience/gist:726875
Alienscience's shell lib
(ns shell
"Run OS commands"
(:import [java.io BufferedReader InputStreamReader]))
(defn run
"Executes the given command"
[cmd]
(.. Runtime getRuntime (exec (str cmd))))
(defn pipe-to
@malfario
malfario / Monokai-Bright.tmTheme
Created June 22, 2011 22:05
Monokai Bright Textmate Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@malfario
malfario / glassfish
Created May 6, 2012 11:05
Glassfish init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: glassfish
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Glassfish application server
# Description: Starts and stops glassfish application server domains
### END INIT INFO
@malfario
malfario / setup.nsi
Last active December 13, 2017 09:28
NSIS basic script
;##
# Project info.
# @author <author>
#;
!define APPNAME "APPNAME"
!define VERSION "0.1"
!define PUBLISHER "Humano Software S.L."
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
!define /date CURRENT_YEAR "%Y"
#EXTINF:-1,Nickelodeon
http://B29273.cdn.telefonica.com/29273/NICK_SUB.m3u8
#EXTINF:-1,Disney Junior
http://B29285.cdn.telefonica.com/29285/DSNJR_SUB.m3u8
#EXTINF:-1,40TV
http://B31312.cdn.telefonica.com/31312/40TV_SUB.m3u8
#EXTINF:-1,Disney XD
http://B31309.cdn.telefonica.com/31309/DSNYXD_SUB.m3u8
#EXTINF:-1,Canal Cocina
http://B31305.cdn.telefonica.com/31305/COCINA_SUB.m3u8
@malfario
malfario / init.lua
Last active December 30, 2015 22:53
border = nil
function writeActiveTitle(win, appTitle, event)
if win ~= hs.window.focusedWindow() then return end
local activeTitle = appTitle
local winTitle = win:title()
if winTitle ~= "" then
activeTitle = activeTitle.." - "..winTitle
end
@malfario
malfario / user.clj
Last active February 23, 2017 13:40
(ns user
(:require [remote-shell.util :refer [load-remote-script]]))
(def script-repo "https://gitlab.com/malfario/rsh-scripts/raw/master")
(def scripts
{:ftp (str script-repo "/ftp.clj")
:ruby (str script-repo "/ruby.clj")})
@malfario
malfario / virtualenv.lua
Last active January 11, 2018 18:10
Cmder virtualenv prompt fix
-- Code based on https://github.com/cmderdev/cmder/issues/1056
-- with modifications to make it actually work (https://github.com/cmderdev/cmder/issues/1056#issuecomment-237403714)
---
-- Find out current conda/virtual envs
-- @return {false|conda/virtual env name}
---
local clink_path_lua_file = clink.get_env('CMDER_ROOT')..'\\vendor\\clink-completions\\modules\\path.lua'
dofile(clink_path_lua_file)
@malfario
malfario / define-clojure-indent.lisp
Created March 12, 2018 06:46
Compojure indent in spacemacs
(define-clojure-indent
(defroutes 'defun)
(GET 2)
(POST 2)
(PUT 2)
(DELETE 2)
(HEAD 2)
(ANY 2)
(OPTIONS 2)
(PATCH 2)
@malfario
malfario / keybase.md
Created May 11, 2018 09:55
Keybase proof

Keybase proof

I hereby claim:

  • I am malfario on github.
  • I am malfario (https://keybase.io/malfario) on keybase.
  • I have a public key ASDpRJn7k820MQ78-mxp8m1TktFJR4oHum2FegdOUFy7cQo

To claim this, I am signing this object: