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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current] | |
@="" | |
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\AppGPFault\.Current] | |
@="" | |
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\CCSelect] | |
@="" |
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
rem For Windows 10 | |
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.8.8 index=1 | |
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.4.4 index=2 | |
rem For Windows 7 | |
netsh interface ipv4 add dnsserver "Local Area Connection" address=8.8.8.8 index=1 | |
netsh interface ipv4 add dnsserver "Local Area Connection" address=8.8.4.4 index=2 |
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
request = require 'request' | |
http = require 'http' | |
fs = require 'fs' | |
unirest = require 'unirest' | |
needle = require 'needle' | |
bhttp = require 'bhttp' | |
url = 'http://raw.githubusercontent.com/alrra/browser-logos/master/main-desktop.png' | |
# request |
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
net stop "HomeGroup Listener" | |
sc config "HomeGroupListener" start= disabled | |
net stop "HomeGroup Provider" | |
sc config "HomeGroupProvider" start= disabled |
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
var http = require('http'); | |
var fs = require('fs'); | |
var child_process = require('child_process'); | |
var pageUrl = "http://nodejs.org/download/"; | |
var downloadUrlRegex = /http:\/\/nodejs\.org\/dist\/v[0-9\.]+\/x64\/node-(v[0-9\.]+)-x64\.msi/i; | |
var downloadUrl; | |
var downloadVersion; | |
var pageSource; | |
var filePath = "node.msi"; |
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 | |
export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-oracle/jre/lib/amd64 | |
# /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64 | |
export OPT1="Start Minecraft Launcher" | |
export OPT2="Start Technic Launcher" | |
export OPT3="Start Magic Launcher" | |
export OPT4="Quit" |
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 http://sourceforge.net/projects/pywin32/ | |
__module_name__ = 'Foobar2000 Now Playing' | |
__module_version__ = '0.1' | |
__module_description__ = 'Prints what is playing from foobar2000' | |
import xchat | |
import win32gui | |
import re | |
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
page = require('webpage').create() | |
fs = require 'fs' | |
system = require 'system' | |
page.onConsoleMessage = (msg) -> console.log(msg) | |
page.open "http://en.wikipedia.org/wiki/Bleach_episodes", (status) -> | |
csv = page.evaluate -> | |
formatDate = (date) -> | |
date.getFullYear() + "-" + ((if date.getMonth() < 9 then "0" else "")) + (date.getMonth() + 1) + "-" + ((if date.getDate() < 10 then "0" else "")) + date.getDate() |
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
import timeit | |
t = timeit.Timer(stmt="splitext(__file__)[0]", setup="from os.path import splitext") | |
print t.timeit() # 2.1748800403 | |
t = timeit.Timer(stmt="__file__[:-3]") | |
print t.timeit() # 0.110901126177 | |
t = timeit.Timer(stmt='__file__[:__file__.rindex(".")]') | |
print t.timeit() # 0.387404180721 |
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
import timeit | |
t = timeit.Timer(stmt="datetime.datetime(*datetime.datetime.now().date().timetuple()[:6])", setup="import datetime") | |
print t.timeit() # 4.80428367916 | |
t = timeit.Timer(stmt="datetime.datetime.combine(datetime.datetime.now().date(), datetime.time(0, 0, 0))", setup="import datetime") | |
print t.timeit() # 3.23761676673 |