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 python3 | |
| # -*- coding: utf-8 -*- | |
| '''Fix Windows encoding problem''' | |
| import os | |
| import sys | |
| import codecs | |
| def set_win_encoding(codepage=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
| @title Remove Steam Uninstall Links From Windows | |
| @net session >nul 2>&1 | |
| @if %errorlevel% == 0 ( | |
| @for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f | |
| @for /F "delims=" %%a in ('reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall ^| findstr /C:"Steam App"') do @reg delete "%%a" /f | |
| @echo Success! | |
| @pause>nul | |
| ) else ( | |
| @echo You do not have Administrator Priveleges. Try right clicking and choosing 'run as administrator ' | |
| @pause>nul |
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
| kill $(lsof -t -i:8080) |
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
| # Portable "getch" | |
| try: | |
| from msvcrt import getch | |
| except ImportError: | |
| def getch(): | |
| import sys, tty, termios | |
| fd = sys.stdin.fileno() | |
| old_settings = termios.tcgetattr(fd) | |
| try: | |
| tty.setraw(sys.stdin.fileno()) |
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
| img { | |
| image-rendering: optimizeSpeed; /* STOP SMOOTHING, GIVE ME SPEED */ | |
| image-rendering: -moz-crisp-edges; /* Firefox */ | |
| image-rendering: -o-crisp-edges; /* Opera */ | |
| image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */ | |
| image-rendering: pixelated; /* Chrome */ | |
| image-rendering: optimize-contrast; /* CSS3 Proposed */ | |
| -ms-interpolation-mode: nearest-neighbor; /* IE8+ */ | |
| } | |
| /* From http://stackoverflow.com/questions/14068103/disable-antialising-when-scaling-images */ |
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 get_json(url, callback) { | |
| callback = callback || function(){} | |
| var request = new XMLHttpRequest() | |
| request.open('GET', url, true) | |
| request.onload = function () { | |
| if (request.status >= 200 && request.status < 400) { | |
| // Success! | |
| var data = JSON.parse(request.responseText) | |
| callback(data) | |
| } else { |
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 download(data, filename, type) { | |
| var a = document.createElement('a') | |
| var file = new Blob([data], { type: type }) | |
| if (window.navigator.msSaveOrOpenBlob) // IE10+ | |
| window.navigator.msSaveOrOpenBlob(file, filename) | |
| else { // Others | |
| var url = URL.createObjectURL(file) | |
| a.href = url | |
| a.download = filename | |
| document.body.appendChild(a) |
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 parse_query(name, url) { | |
| if (!url) | |
| url = window.location.href | |
| name = name.replace(/[\[\]]/g, "\\$&") | |
| var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)") | |
| var results = regex.exec(url) | |
| if (!results) return null | |
| if (!results[2]) return '' | |
| return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
| } |
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 get_style( dom ) { | |
| var style; | |
| var returns = {}; | |
| // FireFox and Chrome way | |
| if(window.getComputedStyle){ | |
| style = window.getComputedStyle(dom, null); | |
| for(var i = 0, l = style.length; i < l; i++){ | |
| var prop = style[i]; | |
| var val = style.getPropertyValue(prop); | |
| returns[prop] = val; |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Forms; | |
| namespace Utils | |
| { | |
| public delegate int keyboardHookProc(int code, int wParam, ref keyboardHookStruct lParam); |