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
| puts "Script executed with $argc arguments" | |
| set msg "" | |
| foreach i $argv { | |
| append msg $i | |
| # Append comma if there's more than one argument | |
| if {$i ne [lindex $argv $argc-1]} { | |
| append msg ", " | |
| } | |
| } |
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
| $Source = @” | |
| using System; | |
| using System.IO; | |
| namespace WillThisBlend | |
| { | |
| public static class LetsSee | |
| { | |
| public static bool Check() | |
| { |
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
| { | |
| "bindings": [ | |
| { | |
| "type": "eventHubTrigger", | |
| "name": "myEventHubMessage", | |
| "direction": "in", | |
| "path": "marioevents", | |
| "connection": "breakingnews" | |
| }, | |
| { |
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
| # http://stackoverflow.com/a/39644735/4148708 | |
| tcpdump -ni eth0 "tcp port 443 and (tcp[((tcp[12] & 0xf0) >> 2)] = 0x16)" |
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
| from __future__ import absolute_import, unicode_literals | |
| import sys, os, cStringIO, urllib, base64 | |
| import json | |
| # Add function directory to import path | |
| sys.path.append(os.path.abspath(os.path.join(os.path.dirname( __file__ )))) | |
| sys.path.append(os.path.abspath(os.path.join(os.path.dirname( __file__ ), 'lib'))) | |
| from AzureHTTPHelper import HTTPHelper | |
| http = HTTPHelper() |
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
| curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
| sudo apt-get install -y nodejs |
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 class MyStringExtensions | |
| { | |
| public static string Truncate(this string value, int maxLength) | |
| { | |
| if (string.IsNullOrEmpty(value)) return value; | |
| return value.Length <= maxLength ? value : value.Substring(0, maxLength); | |
| } | |
| } |
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
| $LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound) | |
| # Source: | |
| # https://gist.github.com/kurokikaze/350fe1713591641b3b42 |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <system.web> | |
| <httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/> | |
| </system.web> | |
| <system.webServer> | |
| <security> | |
| <requestFiltering> | |
| <requestLimits maxQueryString="32768"/> | |
| </requestFiltering> |
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
| cat = "CAT" | |
| dog = "DOG" | |
| # Python 2.6+ | |
| print "Molly wants a {cat} and a {dog}.".format(cat=cat, dog=dog) | |
| # Molly wants a CAT and a DOG. | |
| # below 2.6 | |
| print "Molly wants a %s and a %s." % (cat, dog) | |
| # Molly wants a CAT and a DOG. |