Skip to content

Instantly share code, notes, and snippets.

@AlyxRen
AlyxRen / Class Specific
Created June 10, 2014 06:07
Yanfly Scripts
#==============================================================================
#
# ▼ Yanfly Engine Ace - Class Specifics v1.00
# -- Last Updated: 2011.12.23
# -- Level: Normal
# -- Requires: YEA - Class System v1.03+
#
#==============================================================================
$imported = {} if $imported.nil?
@AlyxRen
AlyxRen / GPL.md
Created February 28, 2013 23:38 — forked from jnrbsn/GPL.md

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

#!/usr/local/bin/ruby
require "socket"
# Don't allow use of "tainted" data by potentially dangerous operations
$SAFE=1
# The irc class, which talks to the server and holds the main event loop
class IRC
def initialize(server, port, nick, channel)
@AlyxRen
AlyxRen / Gratuitous_Globals.php
Created May 8, 2012 14:41
Being that it's from a Wordpress Plugin digg-digg, it is required to be GPL Licensed. That means I can copy it out here and show off this amazing use of PHP's define()... Or rather, an amazing use of PHP in general.
<?php
/**
* Define all global constant variables
*/
require_once 'dd-class.php';
// XXX: This is some crazy use of global constants... a bit nasty if you ask me...
define('DD_NAME','Digg Digg');
define('DD_VERSION','5.2.6');
<script language=javascript type='text/javascript'>
function checkAll(chkname)
{
if(this.checked) {
alert(chkname);
}
}
</script>
@AlyxRen
AlyxRen / LICENSE.txt
Created May 20, 2011 19:26 — forked from jed/LICENSE.txt
generate random UUIDs
Copyright (c) 2011 Jed Schmidt, http://jed.is
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:
@AlyxRen
AlyxRen / LICENSE.txt
Created May 20, 2011 19:25 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
Copyright (c) 2011 YOUR_NAME_HERE, YOUR_URL_HERE
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:
#!/usr/bin/env python
# coding=UTF-8
import math, subprocess
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE)
output = p.communicate()[0]
o_max = [l for l in output.splitlines() if 'MaxCapacity' in l][0]
o_cur = [l for l in output.splitlines() if 'CurrentCapacity' in l][0]
@AlyxRen
AlyxRen / Interval.js
Created January 17, 2011 09:39
Awesome Interval machiene
var Interval = (function (und){
return function(fn, time, count){
if (time !== time-0) return null;
if (count !== count-0) count = -1;
switch (count){
case -1:
return setInterval(fn, time);
break;
case 0:
return setTimeout(fn, time);
/*
Copyright 2010 Stephen "Rixius" Middleton
Licensed under the MIT-style License <http://www.opensource.org/licenses/mit-license.html>
usage Style(Object styleRules, object Options)
Options: { //with defaults
makeStyle: true, //if true makes the <style> elment and wraps it around the styles
placeInDOM: false, //if true, if makeStyle is true, then places the elemen ad the of the <head> element
important: false //appends " !important" at the end of each declration, Just in case it's needed;