Skip to content

Instantly share code, notes, and snippets.

-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.widget.cpu = require("awful.widget.cpu")
awful.widget.battery = require("awful.widget.battery")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
---------------------------------------------------------------------------
-- @author jesus <ask@jesus.now>
-- @copyright 0 Jesus
-- @release v0.0.0
---------------------------------------------------------------------------
local setmetatable = setmetatable
local os = os
local textbox = require("wibox.widget.textbox")
local capi = { timer = timer }
@zarac
zarac / src
Created September 2, 2017 19:00
#!/bin/env bash
#
# a tool to help with source control
# only does git, but could/should handle more (hg, svn, ..)
#
# TODO normalize output (of find)
#
# // zarac
COLDEF="\033[0m" # default
#!/bin/sh
FILE=$1 && shift
# screen with and height
wh=$(xrandr | grep '*' | awk '{ print $1 }')
w=$(echo $wh | awk -F'x' '{ print $1 }')
h=$(echo $wh | awk -F'x' '{ print $2 }')
if [ -z $FPS ]; then
@zarac
zarac / couchapp-push.sh
Last active December 26, 2015 14:48
.sh couchapp push
#!/bin/sh
up='user:password'
line="couchapp push app.js http://${up}@host/database"
echo $line
$line
@zarac
zarac / app.js
Created October 21, 2013 16:35
couchapp app.js
var couchapp = require('couchapp')
var path = require('path')
var ddoc = {
_id : "_design/index",
rewrites : [
{ from : '',
to : '_list/tags/tag' },
{ from : '*',
@zarac
zarac / index.html
Created September 8, 2013 11:10
index.html
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta>
<title>where am i?</title>
<link href="css/index.css" type="text/css" rel="stylesheet"></link>
@zarac
zarac / autocmd-BookmarkRemove.patch
Created August 9, 2013 05:13
vimperator patch - BookmarkRemove event
diff -r 6e73b263c987 common/content/bookmarks.js
--- a/common/content/bookmarks.js Wed Jul 10 23:31:27 2013 +0900
+++ b/common/content/bookmarks.js Fri Aug 09 07:02:39 2013 +0200
@@ -187,6 +187,8 @@
let bookmarkObserver = function (key, event, arg) {
if (event == "add")
autocommands.trigger("BookmarkAdd", arg);
+ else if (event == "remove")
+ autocommands.trigger("BookmarkRemove", arg);
};
@zarac
zarac / SetTagsFile.vim
Last active September 25, 2015 09:37
vim SetTagsFile()
"" Path to tags file.
function! SetTagsFile()
let cwd = expand('%:p:h')
if cwd =~# "/some/path/.*"
if !exists("tags[/some/path/tags]")
set tags+=/some/path/tags
endif
endif
endfunction
/**
* Created by zarac on 10/28/14.
*/
import com.microsoft.sqlserver.jdbc.SQLServerDriver;
import java.sql.*;
public class mainz0r {
public static String connectionUrl = "jdbc:sqlserver://vart.nu:8887;databaseName=GRUPP18C;user=alle;password=hemligt;";