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
/* all this verbosity is required for this to work reliably and predictably | |
* on both GCC and MSVC | |
*/ | |
/* because gcc cpp doesn't recursively expand macros, so a single CALLIT | |
* macro can't be used in all the FE_n macros below | |
*/ | |
#define FE_CALLITn01(a,b) a b | |
#define FE_CALLITn02(a,b) a b |
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 python | |
# with help and inspiration from | |
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
import sys | |
import base64 | |
import struct |
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
### | |
# Copyright (c) 2013, Andy Bakun and Yelp! | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, | |
# this list of conditions, and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright notice, |
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 | |
# find all supermicro Java iKVM Viewer windows and resize | |
# them to display all the content | |
# | |
# for reasons that are beyond sanity, this shitty closed source program | |
# sets the min and max window sizes to the same values, making it unresizable | |
# through dragging. | |
# this wouldn't be so bad if it actually resized the window to display all | |
# the content. it constantly resizes based on the resolution of the |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist> | |
<array> | |
<dict> | |
<key>AudioList</key> | |
<array> | |
<dict> | |
<key>AudioBitrate</key> | |
<string>320</string> |
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 <stdlib.h> | |
#include <stdarg.h> | |
void openlog(const char *ident, int option, int facility) { | |
return; | |
} | |
void syslog(int priority, const char *format, ...) { | |
va_list va; | |
va_start(va, format); |
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 | |
# source this file in the shell | |
# | |
# the shell function tmx will start a new, persistent (meaning you can be | |
# connected to it multiple times at the same time), with the ssh-agent | |
# connection available even if you get disconnected and reconnect | |
# | |
# start or connect to an instance named "default" | |
# tmx |
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 | |
exec 3> >( while /bin/true ; do socat -t0 -T0 -u STDIN UDP:172.28.128.3:8888 ; done ) | |
while /bin/true; do | |
while read line; do | |
echo "$line" | |
echo "$line" >&3 | |
sleep 0.1 | |
done < /vagrant/testlog | |
done |
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 | |
# assign var1 varN... = c arg... | |
# execute c and assign captured values to the list of variables | |
# | |
# values can be output from c by redirecting/writing to: | |
# >${outvar[x]} | |
# >&x | |
# where x is the index of the variable you want to return the value | |
# 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
#!/bin/bash -x | |
if [[ -z "$XTXAUTH" ]]; then | |
echo "XTXAUTH not set, was this invoked correctly?" | |
exit 1 | |
fi | |
unset XAUTHORITY | |
server=$( echo "$XTXAUTH" | awk '{ print $1 }' ) | |
xauth add $XTXAUTH |
NewerOlder