Skip to content

Instantly share code, notes, and snippets.

@jack126guy
jack126guy / test.php
Last active Jan 5, 2016
phpDocumentor test
View test.php
<?php
/**
* Test file
*
* @author Jack126Guy someanon126@gmail.com
* @license http://creativecommons.org/publicdomain/zero/1.0/
* Creative Commons CC0 1.0 Universal
*/
namespace {
@jack126guy
jack126guy / cl
Created Oct 12, 2015
"microsoft-c++-express-2010" Debian package contents
View cl
#!/bin/sh
CONF_DIR='/etc/microsoft-c++-express-2010'
if [ -f "$CONF_DIR/cl-base" ]; then
#Trim whitespace
CC="`cat "$CONF_DIR/cl-base" | \
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
`"
else
@jack126guy
jack126guy / control
Created Oct 12, 2015
"dosoption" Debian package contents
View control
Package: dosoption
Version: 1.1
Section: misc
Priority: optional
Architecture: all
Installed-Size: 2
Maintainer: Jack126Guy <someanon126@gmail.com>
Description: Execute programs using DOS-style options
This package contains a script that converts DOS-style
options into Unix-style options.
@jack126guy
jack126guy / questioner.c
Last active Aug 29, 2015
Question-binary encoder ("questioner") and decoder ("questions")
View questioner.c
/*
Question-binary encoder.
Reads data from standard input and outputs question-binary.
Available under the MIT License (below).
----------
The MIT License (MIT)
Copyright (c) 2015 Jack126Guy
View Makefile
all: me a sandwich
me:
@printf 'You '
a:
@printf 'are '
sandwich:
@printf 'a sandwich\n'
View pgp-key-info.txt
Key ID: 0xBD956688FF815C0D
Fingerprint: 37AC 8245 20FA 0243 CF0E 8309 BD95 6688 FF81 5C0D
@jack126guy
jack126guy / apt-get
Last active Mar 5, 2021
"apt-get-rekt" Debian package contents
View apt-get
#!/bin/sh
APT_GET_REAL="apt-get.real"
EXIT_FAILURE=100
if [ "$#" -lt 1 ]; then
#No action specified
$APT_GET_REAL #Print default help
echo 'Get rekt.'
exit
@jack126guy
jack126guy / control
Created Jun 4, 2015
"linuxmasterrace" Debian package contents
View control
Package: linuxmasterrace
Version: 1.2
Section: misc
Priority: optional
Architecture: all
Depends: xdg-utils, www-browser
Installed-Size: 1
Maintainer: Jack126Guy <someanon126@gmail.com>
Description: Open /r/linuxmasterrace on Reddit
This package contains a simple script to open the
@jack126guy
jack126guy / freelist.c
Last active Aug 29, 2015
"Free list" example
View freelist.c
/*
* http://en.wikipedia.org/wiki/Free_list
* This code in the public domain under Creative Commons CC0 1.0 Universal Public Domain Dedication:
* http://creativecommons.org/publicdomain/zero/1.0/
*/
typedef struct free_list_node {
void* memory;
size_t size;
struct free_list_node* next;
@jack126guy
jack126guy / cleanwhitespace.pl
Last active Aug 29, 2015
Remove trailing whitespace
View cleanwhitespace.pl
#!/usr/bin/perl
#This does not read the file from standard input; rather, it processes a list of files, one per line, from standard input.
#This script is in the public domain (http://creativecommons.org/publicdomain/zero/1.0/)
use strict;
use feature 'unicode_strings';
use File::Copy 'move';
while(<STDIN>) {
chomp;
print 'Processing ', $_, "\n";
my ($SOURCEFILE, $NEWSOURCE);