This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
"0 run vim -V9myvimlog - creates a vim runtime log file at debug level 9 | |
" Pathogen calls | |
" | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file=`which parallel` | |
echo $file | |
for file in *.pdf; | |
do | |
echo "Now cropping file: $file" | |
pdfcrop $file $file > /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script exctracts a specific number of pages from a pdf file. | |
# | |
# Arguments: $1 -> Input file | |
# $2 -> Outout file | |
# $3 -> First page (to cut) | |
# $4 -> Last page | |
# | |
# Example: pdf_split input.pdf output.pdf 1 5 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
echo -n "Original URL: " | |
read url | |
short_url=$(curl -s http://tinyurl.com/api-create.php?url=${url}) | |
echo "Short URL: ${short_url}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# A minimal script that counts the number of words in a LaTeX file. | |
# Example of use: | |
# localhost@name$ wclatex filename | |
import re | |
import sys | |
def word_counter(filename): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define SIZE 1000000 | |
typedef struct { | |
float *x; | |
} test_s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
tail -n+3 "$0" | gcc -xc - && ./a.out ; exit | |
#include <stdio.h> | |
int main() | |
{ | |
printf("C is a scripting language!\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct TClosure { | |
int (*code)(struct TClosure *env, int); | |
int state; | |
} Closure; | |
int call(Closure *c, int x) { | |
return c->code(c, x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* #include <stdlib.h> */ | |
static inline void fclosep(FILE **fp) { if (*fp) fclose(*fp); *fp=NULL; } | |
#define _cleanup_fclose_ __attribute__((cleanup(fclosep))) | |
void example_usage(void) | |
{ | |
_cleanup_fclose_ FILE *logfile = fopen("logfile.txt", "w+"); | |
fputs("hello logfile!", logfile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void print_buffer(void *, int); | |
void catbin(char *); | |
int main(int argc, char **argv) { | |
if (argc == 2){ viewbin(argv[1]); } | |
else{ | |
printf("Please type the name of the binary input file!\n"); | |
printf("Example: viewbin foo.dat \n"); |
OlderNewer