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/perl | |
use Shell qw(hostname date uptime users echo zwrite); | |
use Term::ANSIColor qw(:constants); | |
my $hostname = hostname; | |
chomp($hostname); # remove newline inserted by system command | |
@usersa = split(/\s/, users); # split users into an array | |
my $lncount = 80; # so the first line prints proper ^_^U | |
my $up = substr(uptime, 10); # display server uptime (the timestamp is a bit redudant I guess) | |
my $time = date; # remember where you're at in time |
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
/** | |
* written by Dannel Jurado | |
* version: 03052009 | |
* | |
* changelog 03052009: Welcome screen behavior, instead of just welcome screen | |
* changelog 03032009: submitted version | |
*/ | |
#include <iostream> | |
#include <iomanip> |
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 <string.h> | |
#include <iostream> | |
using namespace std; | |
char * remove_char_from_string(char *input_string, char given_char) { | |
char * newstring = (char *) calloc(strlen(input_string) + 1, sizeof(char)); |
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 <iostream> | |
using namespace std; | |
int * Merge (int a[], int size_a, int b[], int size_b); | |
int main() { | |
int a[] = {1, 5, 8, 9, 13}; | |
int b[] = {2, 6}; | |
int * c = Merge(a, 5, b, 2); |
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 ruby | |
# == Synopsis | |
# jsonpretty: a quick script for making JSON output legible | |
# | |
# == Usage | |
# jsonpretty [a JSON encoded file] | |
# [some stream with JSON text] | jsonpretty | |
# | |
# For this help use: jsonpretty -h |
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
(* written by @chrisamaphone of chrisamaphone fame *) | |
val s_end = "\nval s_start = \"val s_end = \"\nfun quote #\"\\n\" = \"\\\\n\"\n\t| quote #\"\\\\\" = \"\\\\\\\\\"\n\t| quote c = Char.toString c\n\nfun q () = print (s_start ^ \"\\\"\" ^ (concat (map quote (explode s_end))) ^ \"\\\"\" ^ s_end)" | |
val s_start = "val s_end = " | |
fun quote #"\n" = "\\n" | |
| quote #"\\" = "\\\\" | |
| quote c = Char.toString c | |
fun q () = print (s_start ^ "\"" ^ (concat (map quote (explode s_end))) ^ "\"" ^ s_end) |
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
# will highlight the term you are grepping for, works in bash and zsh | |
alias grep='GREP_COLOR="1;37;41" LANG=C grep --color=auto' |
NewerOlder