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
from sqlalchemy import create_engine, MetaData, Table, PrimaryKeyConstraint | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.dialects.oracle import RAW, NUMBER | |
from sqlalchemy.ext.compiler import compiles | |
from sqlalchemy.types import BINARY | |
@compiles(RAW, "oracle") | |
def compile_raw_oracle(type_, compiler, **kw): |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
chflags nouchg /Library/Caches/com.apple.desktop.admin.png | |
cp /Library/Caches/com.apple.desktop.admin.png /Library/Caches/com.apple.desktop.admin.BACKUP.png | |
cp $1 /Library/Caches/com.apple.desktop.admin.png | |
chflags uchg /Library/Caches/com.apple.desktop.admin.png |
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
// ==UserScript== | |
// @name Synopsifier | |
// @namespace http://pythonaro.com/ | |
// @version 1.0 | |
// @description add movie details when browsing directories. | |
// @author toyg | |
// @match http://mc1.dl3enter.in/* | |
// @grant GM_xmlhttpRequest | |
// @connect themoviedb.org | |
// ==/UserScript== |
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
# original source: https://www.reddit.com/r/opendirectories/comments/6vysrh/lots_of_italian_books_is_there_any_way_to/dm46nig/ | |
# plus a few tweaks from me. | |
# This is a Python 2.7 script; you will also need Requests and BeautifulSoup. | |
# If you have virtualenv installed: | |
# $> virtualenv env | |
# $> source env/bin/activate | |
# $> pip install requests beautifulsoup | |
# $> python download.py | |
import codecs |
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
Determining if the CL_VERSION_2_0 exist failed with the following output: | |
Change Dir: /Users/toyg/Dev/waifu2x-dev/CMakeFiles/CMakeTmp | |
Run Build Command:"/usr/bin/make" "cmTC_90b7e/fast" | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_90b7e.dir/build.make CMakeFiles/cmTC_90b7e.dir/build | |
Building C object CMakeFiles/cmTC_90b7e.dir/CheckSymbolExists.c.o | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -o CMakeFiles/cmTC_90b7e.dir/CheckSymbolExists.c.o -c /Users/toyg/Dev/waifu2x-dev/CMakeFiles/CMakeTmp/CheckSymbolExists.c | |
/Users/toyg/Dev/waifu2x-dev/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'CL_VERSION_2_0' | |
return ((int*)(&CL_VERSION_2_0))[argc]; | |
^ |
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/local/Cellar/cmake/3.9.0/bin/cmake -H/Users/toyg/Dev/waifu2x-dev -B/Users/toyg/Dev/waifu2x-dev --check-build-system CMakeFiles/Makefile.cmake 0 | |
/usr/local/Cellar/cmake/3.9.0/bin/cmake -E cmake_progress_start /Users/toyg/Dev/waifu2x-dev/CMakeFiles /Users/toyg/Dev/waifu2x-dev/CMakeFiles/progress.marks | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/conv.dir/build.make CMakeFiles/conv.dir/depend | |
cd /Users/toyg/Dev/waifu2x-dev && /usr/local/Cellar/cmake/3.9.0/bin/cmake -E cmake_depends "Unix Makefiles" /Users/toyg/Dev/waifu2x-dev /Users/toyg/Dev/waifu2x-dev /Users/toyg/Dev/waifu2x-dev /Users/toyg/Dev/waifu2x-dev /Users/toyg/Dev/waifu2x-dev/CMakeFiles/conv.dir/DependInfo.cmake --color= | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/conv.dir/build.make CMakeFiles/conv.dir/build | |
make[2]: Nothing to be done for `CMakeFiles/conv.dir/build'. | |
[ 8%] Built target conv | |
/Applications/Xcode.a |
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
function Get-ServiceUpTime | |
{ | |
[CmdletBinding()] | |
param | |
( | |
# Name of Computer(s) to query | |
[Parameter(Mandatory = $false, | |
Position = 1, | |
ValueFromPipelineByPropertyName = $true)] | |
[string[]]$ComputerName = $env:COMPUTERNAME, |
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
#requires -Version 1 | |
$SQLconn = New-Object -TypeName System.Data.SqlClient.SqlConnection -ArgumentList ('server=ardy-sql01; database=foundation; uid=EPMSQL; pwd=Hyp3r10n') | |
$SQLconn.Open() | |
$SQLcmd = $SQLconn.CreateCommand() | |
$SQLcmd.CommandType = [System.Data.CommandType]::Text | |
$SQLcmd.CommandText = | |
'SELECT COMPONENT_NAME, PROPERTY_NAME, PROPERTY_VALUE FROM HSS_COMPONENT_PROPERTY_VALUES inner join HSS_COMPONENT on HSS_COMPONENT_PROPERTY_VALUES.COMPONENT_ID = HSS_COMPONENT.COMPONENT_ID order by component_name asc' | |
$data = $SQLcmd.ExecuteReader() | |
$dataTable = New-Object -TypeName 'System.Data.DataTable' |
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
# To use this script, rename LAN, BACKUP etc to match relevant network card names | |
# in your environment (you can add or remove lines as well), | |
# and set values to match your metric preference (1 is the preferred card). | |
# All cards not mentioned here will be set to 100. | |
$cards = @{} # don't touch this line | |
$cards.LAN = 1 | |
$cards.BACKUP = 99 |
OlderNewer