Skip to content

Instantly share code, notes, and snippets.

View vst's full-sized avatar
😳

Vehbi Sinan Tunalioglu vst

😳
View GitHub Profile
@vst
vst / parseEBSstatement.py
Created January 11, 2012 05:38
Parses an EBS statement retrieved from secure.ebs.in and produces a simpler representation for bank account management.
##############################################################################
# Copyright 2012 Vehbi Sinan Tunalioglu #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
@vst
vst / xts_json.R
Created November 23, 2011 08:32
Marshalling between xts objects and JSON representations of xts objects.
##' Declares the generic as.json method.
##'
##' @param x the object to be marshalled to JSON
##' @param ... extra arguments to the actual function
##' @return a JSON representation of the consumed object.
##' @export
as.json = function (x, ...) {
UseMethod("as.json")
}
@vst
vst / changelog.sh
Created November 3, 2014 03:30
Changelog preperation script for Git repositories
#!/bin/bash
########################################################################
# Description:
# Produces custom ChangeLog file contents out of the "git log"
#
# Usage:
# sh changelog.sh
#
# Usage (Save output):
@vst
vst / randstr.js
Created June 30, 2014 09:49
Javascript function which produces random strings
/**
* Constructs a random string with the given length and character set.
*
* If no character set is provided, default character set will be used.
*/
function randstr (length, charset) {
// (Re)define the charset:
charset = charset || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
// construct and return:
@vst
vst / mypcal.sh
Last active August 29, 2015 14:01
Creates and views a yearly calendar
#!/bin/bash
# For Mac OSX :|
pcal -w -P a4 -F 1 -t Garamond -d Garamond | open -a preview -f
@vst
vst / vst-tmdfile.el
Last active August 29, 2015 13:57
Creates a temporary file at the configured destination #emacs
;; Declares the variable for the destination folder.
(defvar *vst-tmdfile-folder* "/tmp")
;; Defines the function which creates a temporary markdown file in the
;; destination folder.
(defun vst-tmdfile ()
(interactive)
(find-file (format "%s/%s.md"
*vst-tmdfile-folder*
(format-time-string "%Y-%m-%dT%T"))))
@vst
vst / cransync.sh
Last active August 29, 2015 13:57
Creates a folder named `CRAN` in the same folder as this script and mirrors/syncs master CRAN repository to the `CRAN` folder.
#!/bin/bash
## **Description:** Creates a folder named `CRAN` in the same folder
## as this script and mirrors/syncs master CRAN repository to the
## `CRAN` folder.
# Get the script path:
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
# Get the mirror path: