Skip to content

Instantly share code, notes, and snippets.

@vicolachips44
vicolachips44 / gist:a26cb2b241a0a2864775
Created March 23, 2015 14:08
dual screen - non blocking mouse (with <> screen layouts)
#!/bin/sh
LEFT_TRIGGER=1366;
BOTTOM_TRIGGER=768;
while :;
do sleep 0.10;
eval $(xdotool getmouselocation --shell);
#
if [ $X -eq $LEFT_TRIGGER ] && [ $Y -gt $BOTTOM_TRIGGER ]; then
xdotool mousemove 1362 764
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@vicolachips44
vicolachips44 / .vimrc
Last active August 29, 2015 14:12
latest .vimrc configuration file
set nocompatible
filetype off
set encoding=utf-8
scriptencoding utf-8
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"""--- PLUGIN SECTION BEGIN ---"""
Plugin 'gmarik/Vundle.vim'
Plugin 'kien/ctrlp.vim'
@vicolachips44
vicolachips44 / gruntfile.js
Created November 8, 2014 19:20
Symfony2 deployment with grunt! (a reminder)
/**
* @author vga@decatime.org
* @license MIT
*
* 2014-11-08
*/
module.exports = function(grunt)
{
require('load-grunt-tasks')(grunt);
#!/bin/bash
# Might as well ask for password up-front, right?
sudo -v
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Example: do stuff over the next 30+ mins that requires sudo here or there.
function wait() {
@vicolachips44
vicolachips44 / calendar-utils.coffee
Last active August 29, 2015 13:58
A calendar to remind me that coffeescript might worth it!
class CalendarUtils
##---------------------------------------------------------------------------
@padNumber = (count, value) ->
svalue = value.toString()
spad = Array(count - svalue.length + 1).join '0'
# return the value
spad + svalue
##---------------------------------------------------------------------------
@getNextMonth = (year, month) ->
@vicolachips44
vicolachips44 / gist:9562140
Created March 15, 2014 05:15
virtualbox guest constraint size to 720p for screencast
to be able to screencast at a good size for delivery on youtube (linux-mint is the name of the VM):
$ vboxmanage guestproperty set linux-mint /VirtualBox/GuestAdd/Vbgl/Video/SavedMode 1280x720x32
<?xml version="1.0" encoding="utf-8"?>
<project>
<!-- <meta />
Use meta nodes to set metadata for your application. The description is ignored
on most targets, but is useful for packaging like Chrome Apps or Opera Widgets.
For compatibility with Android and webOS, the package name must include at least
@vicolachips44
vicolachips44 / svg_text_rendering.hx
Created November 2, 2013 11:23
haxe based sipnets
package com;
import flash.display.Shape;
import format.SVG;
import org.decatime.ui.component.BaseContainer;
import org.decatime.ui.layout.*;
class Testin extends BaseContainer {