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
# Inspiration from | |
# | |
# http://blogs.msdn.com/b/opticalstorage/archive/2010/08/13/writing-optical-discs-using-imapi-2-in-powershell.aspx | |
# | |
# and | |
# | |
# http://tools.start-automating.com/Install-ExportISOCommand/ | |
# | |
# with help from | |
# |
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
var adBlockEnabled = false; | |
var testAd = document.createElement('div'); | |
testAd.innerHTML = ' '; | |
testAd.className = 'adsbox'; | |
document.body.appendChild(testAd); | |
window.setTimeout(function() { | |
if (testAd.offsetHeight === 0) { | |
adBlockEnabled = true; | |
} | |
testAd.remove(); |
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
public static string Humanize(this Type type, bool includeNamespace = false) | |
{ | |
// simply return its name | |
if (!type.IsGenericType) | |
return includeNamespace ? $"{type.Namespace}.{type.Name}" : type.Name; | |
// what are you doing | |
if (type.IsNested && type.DeclaringType.IsGenericType) | |
throw new NotImplementedException(); |
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
[Command("ping")] | |
[Alias("latency")] | |
[Summary("Shows the websocket connection's latency and time it takes for me send a message.")] | |
public async Task PingAsync() | |
{ | |
// start a new stopwatch to measure the time it takes for us to send a message | |
var sw = Stopwatch.StartNew(); | |
// send the message and store it for later modification | |
var msg = await ReplyAsync($"**Websocket latency**: {Context.Client.Latency}ms\n" + |
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
// define a static array of paths that we'll choose the image from | |
// we make it static so it isn't reinstantiated unnecessarily each time we run a command from this module | |
private static string[] _imagePaths = new[] { "images/hackerman.jpg", "images/computerman.jpg", "images/polarbear.png" }; | |
[Command("image")] | |
[Alias("picture")] | |
[Summary("Sends a random image.")] | |
public async Task ImageAsync() | |
{ | |
// using a new instance of the Random class we randomize a path with an index from 0 to x - 1, where x is the amount of paths in the array |
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
<?php | |
function randomPassword($len = 10){ | |
/* Programmed by Christian Haensel | |
** [email protected] | |
** http://www.chftp.com | |
** | |
** Exclusively published on weberdev.com. | |
** If you like my scripts, please let me know or link to me. | |
** You may copy, redistribute, change and alter my scripts as | |
** long as this information remains intact. |
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
https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/hosts.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-simplified/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-adservers/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-coinminer/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-facebook/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-facebook/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/blocklist.kowabit.de/list.txt | |
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-ad/list.txt |
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 random | |
relationships = {'Spock': {'Scissors': 'smashes', 'Rock': 'vaporizes'}, | |
'Scissors': {'Paper': 'cuts', 'Lizard': 'decapitates'}, | |
'Lizard': {'Paper': 'eats', 'Spock': 'poisons'}, | |
'Rock': {'Lizard': 'crushes', 'Scissors': 'crushes'}, | |
'Paper': {'Spock': 'disapproves', 'Rock': 'covers'} | |
} | |
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.Xml.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace GBVideoTimeCalc | |
{ | |
class Program |
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
// ==UserScript== | |
// @name Make AWS Profile and Region Clearer | |
// @version 1.2 | |
// @include https://*console.aws.amazon.com/* | |
// ==/UserScript== | |
// *** START Configuration *** | |
const fontSize = '17px'; | |
const safeUserNames = ['view']; |