Skip to content

Instantly share code, notes, and snippets.

View damienix's full-sized avatar
🏠
Working from home

Damian Skrodzki damienix

🏠
Working from home
View GitHub Profile
@damienix
damienix / YTDownload.sh
Created December 5, 2010 23:24
Downloads videos loaded by flashplugin.
#!/bin/sh
#: TItle : ytdownload
#; Date : 2010-12-12
#: Modified : 2010-12-14
#: Author : Damian Skrodzki <damienix1@gmail.com>
#: Version : 1.2
#: Description : Downloads videos loaded by flashplugin.
#: TODO : - command line interface
-- Creates ------------------------------------------------------------
CREATE DATABASE stars;
-- TRUNCATE TABLE objects;
CREATE TABLE objects (
oname VARCHAR(32) PRIMARY KEY,
distance FLOAT NULL
);
@damienix
damienix / stats.pl
Created December 12, 2010 16:43
Prints words' statistics for file.
#!/usr/bin/perl
#: Date : 2010-12-12
#: Author : Damian Skrodzki <damienix1@gmail.com>
#: Description : Prints words statistics for file.
open(F, "file") || die("Could not open file!");
@content=<F>;
close(F);
@damienix
damienix / gist:743432
Created December 16, 2010 14:10 — forked from mina86/gist:729036
Prints directory tree
#!/bin/sh
# Title : tree
# See : http://damienix.jogger.pl/2010/12/01/skrypt-bashowy-wyswietlajacy-drzewko-struktury-katalogow/
# Date : 2010-12-16
# Author : Damian Skrodzki <damienix1@gmail.com>
# Description : Prints directory tree
clr_dir='\033[1;34m' # Blue
clr_fil='\033[0;33m' # Yellow
@damienix
damienix / grep.c
Created January 9, 2011 23:59
simple grep
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <unistd.h>
#include <regex.h>
/**
* Simple grep
@damienix
damienix / uptime-client.py
Created January 14, 2011 19:28
Client for scrobbling uptime on uptime.szamanie.pl
#!/usr/bin/python2
# Title : uptime-client
# Date : 2011-01-10
# Modified : 2011-01-13
# Author : Damian Skrodzki <damienix1@gmail.com>
# Version : 0.1
# Description : Client designed for sending data to server for uptime measurement.
# TODO : -
@damienix
damienix / fifo.c
Created February 21, 2011 07:51
queues
#include <stdio.h>
#include <stdlib.h>
struct Node {
struct Node* next;
int val;
};
typedef struct Lifo {
struct Node* head;
@damienix
damienix / FileBrowser.java
Created February 21, 2011 22:09
Simple file browser interface.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package przyklady;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
#!/bin/bash
# cp all *.in to *.ans
for file in *.in
do
f=${file%%.in}
cp "$f.in" "$f.ans"
done