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 | |
# 2014-04-22, v1.0, pull, push, initial clone of projects | |
# 2014-04-26, v2.0, speed improvement, use hashtable to determine push/pull | |
# automatically pull new projects based on remote hashtable | |
# setting up new repo (note: we should automate this at some point): | |
# create local git repo in projects (~/projects/xxx_name) | |
# login remote, create git repo $remote/"$target".git | |
# local git remote add "$remote"/ |
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 searches for suspicious files in the paths ${DEFAULT_DIRS[@]} or in TARGET. | |
# It can also remove them. Based on blacklist and whitelist's. | |
################# | |
### VARIABLES ### | |
################# |
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 | |
# I think I must have been really bored when I wrote this litte script. | |
# Well, it is a good reference for true/false evaluation. | |
echo | |
echo "Testing \"0\"" | |
if [ 0 ] # zero | |
then | |
echo "0 is true." |
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 was a bit toying around with bootstrapping based on autotools. | |
LIBRARY=0 | |
fn_print_help () | |
{ | |
echo "NAME" | |
echo " bootstrap - create acme programming project" | |
echo |
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/env python3 | |
""" Fifo read/write handler snipet | |
Opens the file 'thefifo' for reading and writing. Writes something to the | |
fifo and then enters the read loop. The data written will be recovered | |
unless some other process is reading the file, as the delay will allow the | |
other process to read it. (Try '% cat thefifo' before running the script.)\ | |
""" | |
import os, time, sys, atexit |
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/env python3 | |
""" Cleaning script based on .gitignore file, the 'find' and 'rm' command. | |
It removes files with .gitignore pattern. | |
This script reads the .gitignore file, parses the patterns found there to a | |
shell remove command and then executes it. | |
- With the 'dirs' option it also removes directories. | |
- With the 'debug' option it just prints the command it would execute and exits. |
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/env python3 | |
""" Terminal command shortcut scirpt. | |
This script reads a command data file (~/.scdata) and executes commands from it. | |
There are two command execution models: | |
1. by argement, if you invoke it with a number, it executes this command | |
and exits. If you invoke it with -e opion, it opens the command file | |
for editing and then enters the main loop. | |
2. by loop, if you invoke it withouth an argument, it prints the | |
availible commands and promts for command number (id) to execute. |
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/env python3 | |
# Note: this was just a little toying, rst2man is much better. | |
import string | |
import textwrap | |
def _fmt_help(name, title, description, *args): | |
""" | |
IN |
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
#if HAVE_CONFIG_H | |
# include <config.h> | |
#endif | |
#include <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
#include <stdbool.h> | |
/* maximal size of printing (the rest is truncated) */ |
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
# Python test runner. Add more tests with the test_sequence list. | |
# This assumes that the project to be tested is two folders above (../..) | |
# POSIX only | |
import os | |
import sys | |
import shutil | |
NAME = "TEMPLATE" |
OlderNewer