This file contains hidden or 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
| <script> | |
| function getTime() { | |
| var dt = new Date(); | |
| var def = dt.getTimezoneOffset()/60; | |
| var gmt = (dt.getHours() + def); | |
| var ending = ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()); | |
| var _GMT =check24(((gmt) > 24) ? ((gmt) - 24) : (gmt)); | |
| var mount =check24(((gmt + (24-7)) > 24) ? ((gmt + (24-7)) - 24) : (gmt + (24-7))); | |
| var times = []; | |
| times['gmt'] = (IfZero(_GMT) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds())) + " (GMT -0)"; |
This file contains hidden or 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
| <script> | |
| var loading= false; | |
| $(window).scroll(function() { | |
| if (!loading && ($(window).scrollTop() > $(document).height() - $(window).height() - 100)) { | |
| loading= true; | |
| // your content loading call goes here. | |
| loading = false; // reset value of loading once content loaded |
This file contains hidden or 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
| sleep(int){ | |
| sleep (int * 1000) | |
| } |
This file contains hidden or 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
| Exe("C:\Temp\MyScript.ahk") | |
| Exe(file){ | |
| Loop,%file% | |
| Filename:=RegExReplace(A_LoopFileShortName,"\.[^\.]*$") | |
| Loop,%A_AhkPath% | |
| path:=A_LoopFileDir | |
| FileMove,%A_AhkPath%,%path%\%FileName%.exe | |
| If ErrorLevel | |
| Return ErrorLevel |
This file contains hidden or 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
| ValidIP(ByRef IPAddress) | |
| { | |
| if (StrLen(IPAddress) > 15) | |
| Valid=0 | |
| IfInString, IPAddress, %A_Space% | |
| Valid=0 | |
| StringSplit, Octets, IPAddress, . | |
| if (Octets0 <> 4) |
This file contains hidden or 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
| EmptyMem(PID="AHK Rocks"){ | |
| pid:=(pid="AHK Rocks") ? DllCall("GetCurrentProcessId") : pid | |
| h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid) | |
| DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1) | |
| DllCall("CloseHandle", "Int", h) | |
| } |
This file contains hidden or 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
| private static string RunCommand(string command, string arguments) | |
| { | |
| Process process = new Process(); | |
| process.StartInfo.FileName = command; | |
| process.StartInfo.Arguments = arguments; | |
| process.StartInfo.UseShellExecute = false; | |
| process.StartInfo.RedirectStandardOutput = true; | |
| process.Start(); | |
| // Synchronously read the standard output of the spawned process. |
This file contains hidden or 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
| # Single File Output | |
| from distutils.core import setup | |
| import py2exe, sys, os | |
| sys.argv.append('py2exe') | |
| setup( | |
| options = {'py2exe': {'compressed': True}}, | |
| windows = [{'script': "syslog.py"}], | |
| zipfile = None, | |
| ) |
This file contains hidden or 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
| function obj2array(object){ | |
| x = []; | |
| for( var i in object ) { | |
| x[i] = object[i]; | |
| } | |
| return x; | |
| } |
This file contains hidden or 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
| function hex2a(hex) { | |
| var str = ''; | |
| for (var i = 0; i < hex.length; i += 2) { str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); } | |
| return str; | |
| } |