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 fizzbuzz(){ | |
for ($i=1; $i -lt 101; $i++){ | |
$db=0; | |
if ($i%3 -eq 0){$db = $db -bor 1} | |
if ($i%5 -eq 0){$db = $db -bor 2} | |
switch($db) | |
{ | |
1 { Write-Output "Fizz"} #01 | |
2 { Write-Output "Buzz"} #10 |
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
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
int i=0; | |
for (i=1; i<101; i++){ | |
int db = 0; | |
db = db ^ 1 * (!(i%3)) ^ 2*(!(i%5)); | |
switch (db){ | |
case (1): |
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
1..100|%{"fizz"*!($_%3)+"buzz"*!($_%5)+"$_"*!(!($_%3)-or!($_%5));} |
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 ConvertTo-MarkDownTable() | |
{ | |
$in = [windows.clipboard]::GetText() | |
$lines = $in.split("`n") | |
$out=@() | |
$out += $lines[0] -replace "`r",'' -replace "^","|" -replace ",","|" -replace "$","|`n" | |
$out += $lines[0] -replace "`r",'' -replace "\w+","---" -replace "^","|" -replace ",","|" -replace "$","|`n" | |
$out += $lines[1..($lines.Count-1)] -replace "`r", '' -replace "^", "|" -replace ",","|" -replace "$", "|`n" |
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
[Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.PowerPoint") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
[string] $Source = "$(Split-Path $Script:MyInvocation.MyCommand.Path -Parent)\Slide.html" | |
[int] $DefaultTitleHeight = 150 | |
function Add-Textbox { | |
param ( | |
[object] $Slide, | |
[string] $Text, |
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
/* | |
* FizzBuzz as a PEG Parser | |
* This is the grammar to input to PEG.JS | |
* Output is a JS Parser that will recognize numbers and convert them to: | |
* "fizz" if multiples of 3, "buzz" if multiples of 5, and "fizzbuzz" if multiples of 3 and 5. | |
* Using predicates, I was able to get this to actually create fizz, buzz, and fizzbuzz tokens! Woo! Hoo! | |
*/ | |
start |
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
{ | |
"homepage": "http://xhmikosr.github.io/notepad2-mod/", | |
"license": "BSD", | |
"version": "4.2.25.906", | |
"architecture": { | |
"64bit": { | |
"url": "https://github.com/XhmikosR/notepad2-mod/releases/download/4.2.25.906/Notepad2-mod.4.2.25.906_x64.zip" | |
}, | |
"32bit": { |
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
{ | |
"homepage": "https://github.com/bmatzelle/gow/archive", | |
"version": "0.2014.5.5", | |
"url": "https://github.com/bmatzelle/gow/archive/master.zip", | |
"hash":"12c527edbff9c90fed4b7cc5168b2ba1b64cc57ce4b12d79f2bcd40c2839d36b", | |
"extract_dir": "gow-master/bin", | |
"bin": [ | |
"awk.exe", | |
"basename.exe", | |
"bash.exe", |
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
# EchoArgs.ps1 is a PowerShell script that compiles EchoArgs.cs code into EchoArgs.exe | |
# The Add-Type command is used to generate this CS code. | |
# EchoArgs.exe will be in $env:temp\EchoArgs.exe | |
# EchoArgs.cs Source Code via Keith Hill | |
# From PSCX - Power Shell Community Extensions | |
# URL: http://pscx.codeplex.com/SourceControl/latest#Trunk/Src/EchoArgs/EchoArgs.cs | |
# LicenseURL: http://pscx.codeplex.com/license | |
$EchoArgs_CS = @" |
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
# Automatically Run Disk Clean-Up Utility With Preferred Settings | |
# Windows 8.1/2012 R2; Powershell 4.0 | |
# First, launch CleanMgr.EXE with /sageset: n - where n is some number (defaults to 5000) | |
# You will need to set the settings as you desire in the UI that appears | |
# When you save, it will save the settings in a regkey | |
# for more information, see http://support.microsoft.com/kb/315246 | |
# | |
# The n value, which is stored in the registry, allows you to specify tasks for Disk Cleanup to run. | |
# The n value can be any integer value from 0 to 65535. |
OlderNewer