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
param($ProjectDir) | |
$TargertDir = $env:LOCALAPPDATA + "\Totem" | |
$OrigineRisorse = $ProjectDir + "\Resources" | |
$OrigineTemi = $ProjectDir + "\Themes" | |
$DestRisorse = $TargertDir + "\Resources" | |
$DestTemi = $TargertDir + "\Themes" | |
$OrigineLang = $ProjectDir + "\Languages" | |
$DestLang = $TargertDir + "\Languages" | |
Write-Output "Esecuzione azioni Post Build" |
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 Write-Messages | |
{ | |
[CmdletBinding()] | |
param( | |
[string]$warningFilePath = "C:\Temp\warning.txt", | |
[string]$errorFilePath = "C:\Temp\error.txt" | |
) | |
Write-Host "Host message" |
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 Write-Messages | |
{ | |
[CmdletBinding()] | |
param() | |
Write-Host "Host message" | |
Write-Output "Output message" | |
} | |
# Run with: |
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
# foreach statement | |
foreach ($ps1 in ls -filter $home\*.ps1) {$ps1.length/1024} | |
# foreach inside the pipeline | |
ls -filter $home\*.ps1 | ForEach-Object -process {$_.length/1024} | |
# foreach inside the pipeline omitting -process | |
ls -filter $home\*.ps1 | ForEach-Object {$_.length/1024} | |
# foreach inside the pipeline using foreach alias |
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
// ==UserScript== | |
// @name hackedHN.js | |
// @namespace https://gist.github.com/embayer/ | |
// @version 1.0 | |
// @description big font sizes, full width and alternate mark inversion rows, colorful points | |
// @match https://news.ycombinator.com/ | |
// @copyright 2015, embayer | |
// ==/UserScript== | |
(function styleRows() { |
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
// Stop procrastination (a script for Control Freak extension) | |
// Paste this code into "Javascript" tab with a scope set to "All" | |
// @see https://chrome.google.com/webstore/detail/control-freak/jgnchehlaggacipokckdlbdemfeohdhc | |
var now = new Date(); | |
if (now.getHours() >= 0 && now.getHours() < 6) { | |
var defaultOverflow = getComputedStyle(document.body).overflow || "visible"; | |
document.body.style.overflow = "hidden"; | |
var overlay = document.createElement("div"); | |
overlay.style.background = "rgba(0, 0, 0, .85)"; |
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
// Bunch of javascript from the YouTubes API sample code which allows me to grab all my daily | |
// subsciption videos and insert them into a single playlist for easy listening. | |
// Currently I would have to open each song into a tab and listen to them one by one. Now I can | |
// just hit 'Play All' on the playlist and listen to all the new posts. | |
// Define some variables used to remember state. | |
var playlistId = 'PLyDoEZ08Zam3n_bPBi2ylc_NZV--spj5_'; | |
var channelId; | |
var playlistArray = []; |
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 | |
# An ugly hack to speed up pdflatex using the minted package | |
# place this file with the name 'pygmentize' somewhere on your | |
# path before the 'real' pygmentize, such that this file gets | |
# executed and can act as a wrapper around the 'real' pygmentize. | |
# This script computes a hash-value (md5sum) of the input file | |
# from minted and caches the output of pygmentize. | |
# The working directory is used to store the cached files (it's an ugly hack...) | |
# The real pygmentize command, may need customization to work on your system. |
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 PSAddMember() { | |
$this = $args[0] | |
switch($args.Count) { | |
2 { | |
($args[1] -as [HashTable]) | %{ $_.GetEnumerator() } | %{ Add-Member -InputObject $this -Name $_.Name -value $_.Value -MemberType Noteproperty -Force -PassThru } | |
break; | |
} | |
3 { |
OlderNewer