Skip to content

Instantly share code, notes, and snippets.

@oxnz
oxnz / csd-wrapper.sh
Created May 23, 2016 05:27 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
//
// RVNReceiptValidation.m
//
// Created by Satoshi Numata on 12/06/30.
// Copyright (c) 2012 Sazameki and Satoshi Numata, Ph.D. All rights reserved.
//
// This sample shows how to write the Mac App Store receipt validation code.
// Replace kRVNBundleID and kRVNBundleVersion with your own ones.
//
// This sample is provided because the coding sample found in "Validating Mac App Store Receipts"
// Qt
#include <QCoreApplication>
#include <QStringList>
#include <QFile>
#include <QHash>
#include <QTextStream>
#include <QtDebug>
int main( int argc, char *argv[] )
{

This gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html

Copyright (c) 2013 Gary Burd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@oxnz
oxnz / ruby-init.rb
Last active August 29, 2015 14:09 — forked from bscott/ruby-init.rb
#!/usr/bin/env ruby
#
# app_name This is a startup script for use in /etc/init.d
#
# chkconfig: 2345 80 20
# description: Description of program / service
APP_NAME = 'app_name'
case ARGV.first
@oxnz
oxnz / test.py
Created October 20, 2014 05:19
python function static variable use decorator
def static_variable(name, val):
def decorate(func):
setattr(func, name, val)
return func
return decorate
@static_variable('static_a', 10)
def test():
print test.a
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/epoll.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <poll.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void deamonize() {
if (fork())
exit(0); // exit parent process
setsid(); // become session leader, discard controlling terminal
signal(SIGINT, SIG_IGN);
signal(SIGCHLD, SIG_IGN);