Skip to content

Instantly share code, notes, and snippets.

View reuf's full-sized avatar

Muhamed Halilovic reuf

View GitHub Profile
@reuf
reuf / renameFiles.py
Created May 3, 2012 22:04
This script will append 1_, 2_, 3_ ... to the files with extension .ext in a given directory, e.g. $ python renameFiles.py /path/to/dir/with/pdf "*.pdf"
#!/usr/bin/python
# renameFiles.py
"""
This script will append 1_, 2_, 3_ ... to the name of files with extension .ext in a given directory
$ python renameFiles.py /path/to/dir/with/pdf "*.pdf"
"""
import sys, glob, os
def rename(dir, pattern, titlePattern):
i = 0
@reuf
reuf / Testing.php
Created December 31, 2012 08:01
Testing gist
<?php
echo "Testing gist from Sbulime";
?>
reuf@reuf-VirtualBox:~/Downloads/tc-api-master$ ls
config.js controllers db_conf.json doc package.json Procfile README.md services.js static thirdparty utils views
reuf@reuf-VirtualBox:~/Downloads/tc-api-master$ npm install
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/nodejs-db-informix
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/passport-topcoder
npm http GET https://registry.
@reuf
reuf / log_npm_nodev0.8.26.sh
Created October 20, 2013 09:23
Log of npm install on tc rest api.
reuf@reuf-VirtualBox:~/Downloads/tc-api-master$ npm install
npm WARN package.json tc-api@1.0.0 No repository field.
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/nodejs-db-informix
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/passport-topcoder
npm http GET https://registry.npmjs.org/passport
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/xml2js
npm http 304 https://registry.npmjs.org/nodejs-db-informix
reuf@reuf-VirtualBox:~/Downloads/tc-api-master$ npm install
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/nodejs-db-informix
npm http GET https://registry.npmjs.org/passport-topcoder
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/passport
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/xml2js
npm http 304 https://registry.npmjs.org/nodejs-db-informix
npm http 304 https://registry.npmjs.org/passport-topcoder
# setup vagrant
gem install vagrant
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
mkdir my_vagrant_test
cd my_vagrant_test
vagrant init lucid32
vim Vagrantfile
vagrant up
vagrant ssh
@reuf
reuf / reserve.php
Created January 18, 2014 11:36
reserve class
<?php
/**
* Interface form for placing/modifying/viewing a reservation
* This file will present a form for a user to
* make a new reservation or modify/delete an old one.
* It will also allow other users to view this reservation.
* @author Nick Korbel <lqqkout13@users.sourceforge.net>
* @author David Poole <David.Poole@fccc.edu>
* @version 02-07-09
* @package phpScheduleIt
@reuf
reuf / JavaSyso.java
Created January 25, 2014 06:47
java syso
insta
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
# Loading the pyPdf Library
from pyPdf import PdfFileWriter, PdfFileReader
import os
# Creating a routine that appends files to the output file
def append_pdf(input,output):
[output.addPage(input.getPage(page_num)) for page_num in range(input.numPages)]
# Creating an object where pdf pages are appended to
output = PdfFileWriter()