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
| #!/usr/bin/env python | |
| """ | |
| LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
| """ | |
| import argparse | |
| import datetime | |
| import sys | |
| import time | |
| import threading |
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
| -- String to Int with ord | |
| toNum :: [Char] -> Int | |
| toNum [] = 0 | |
| toNum x = (let (z:xs) = x in (ord z) - (ord '0')) * 10 ^ (length x - 1) + let (z:xs) = x in toNum xs | |
| -- Trimodal logic | |
| data Trimodal = Yes | No | Unknown deriving (Show) | |
| (&&&) :: Trimodal -> Trimodal -> Trimodal | |
| Yes &&& Yes = Yes |
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
| import feedparser | |
| import time | |
| import re | |
| import smtplib | |
| from datetime import datetime | |
| import urllib2 | |
| def internet_on(): | |
| try: | |
| urllib2.urlopen('http://216.58.192.142', timeout=1) |
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
| ############################################################ | |
| ########## Creates IntelliJ launchers for GNOME 3 ########## | |
| ############################################################ | |
| import os | |
| import pwd | |
| import os.path | |
| class Gnome3Application(): | |
| def __init__(self, name, comment, categories, version): |
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
| <templateSet group="JS_FredTux"> | |
| <template name="jcl" value="console.log($1$);" description="console.log" toReformat="false" toShortenFQNames="true"> | |
| <variable name="1" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="JAVA_SCRIPT" value="true" /> | |
| </context> | |
| </template> | |
| <template name="jcll" value=" console.log($1$);" description="new line + console.log" toReformat="false" toShortenFQNames="true"> | |
| <variable name="1" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> |
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
| using System; | |
| using System.Data; | |
| using System.Data.SqlClient; | |
| using System.Data.SqlTypes; | |
| using Microsoft.SqlServer.Server; | |
| using System.Text.RegularExpressions; | |
| public partial class UserDefinedFunctions { | |
| [Microsoft.SqlServer.Server.SqlFunction] | |
| public static SqlBoolean RegexMatch(string inputValue, string regexPattern) { |
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
| ------------------------------------------------------------- | |
| ----- Returns file list of dynamically specified .bak ----- | |
| ------------------------------------------------------------- | |
| CREATE PROC sp_dynRestoreFileList | |
| ( @pPath nvarchar(255) ) | |
| AS | |
| RESTORE FILELISTONLY | |
| FROM DISK=@pPath | |
| GO |