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 MarshalExt | |
| { | |
| // Only needed for .NET 4.5 and earlier | |
| public static T PtrToStructure<T>(IntPtr ptr) | |
| { | |
| return (T)Marshal.PtrToStructure(ptr, typeof(T)); | |
| } | |
| public static T[] PtrToStructureArray<T>(IntPtr ptr, int count) | |
| { |
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
| # | |
| # push.ps1 | |
| # | |
| # Push all Nuget packages to Artifactory if the package version has been updated. Checks to make sure that there was not a | |
| # previous push of the same version using Git tags. | |
| ##### USER PARAMETERS | |
| param ( | |
| [string[]]$csproj_list = $(gci *.csproj), | |
| [string]$source = "artifactory-vt", |
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 Sequential | |
| { | |
| public static void Invoke(params System.Action[] actions) | |
| { | |
| foreach (var a in actions) | |
| a.Invoke(); | |
| } | |
| } |
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
| # | |
| # ROBOCOPY Script | |
| # | |
| # This script calls robocopy over a few folders, and then emails you when they're done | |
| Param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$basesrc, #"G:\", | |
| [Parameter(Mandatory=$true)] | |
| [string]$basedst, # |
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
| # A simple task runner implemented in Powershell | |
| Param( | |
| [String]$TaskName, # The name of the task to run | |
| [parameter(ValueFromRemainingArguments=$true)][String[]]$TaskArgs # The list of repos to run the task on | |
| ) | |
| # Define the tasks | |
| $tasks = @{} |
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
| # Script adapted from the answers in this thread: | |
| # https://social.technet.microsoft.com/Forums/windowsserver/en-US/1fd035f3-a170-4721-a6b5-d4809ca2e39d/getting-list-of-installed-software-that-matches-control-panels-addremove-programs-or-programs?forum=winserverpowershell | |
| # Formatting taken from: | |
| # https://www.howtogeek.com/165293/how-to-get-a-list-of-software-installed-on-your-pc-with-a-single-command/ | |
| if (!([Diagnostics.Process]::GetCurrentProcess().Path -match '\\syswow64\\')) { | |
| $unistallPath = "\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" | |
| $unistallWow6432Path = "\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" | |
| @( |
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
| /* | |
| Implementation of ISynchronizeInvoke for Unity3D game engine. | |
| Can be used to invoke anything on main Unity thread. | |
| ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. | |
| I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject. | |
| help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class | |
| example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631 | |
| version: aeroson 2017-07-13 (author yyyy-MM-dd) |
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
| docker run -d -v `pwd`:/data/webroot -p 8080:80 --name apaxy-home xetusoss/apaxy |
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
| # Creates C resources file from files in given directory | |
| function(create_resources dir output) | |
| # Create empty output file | |
| file(WRITE ${output} "") | |
| # Collect input files | |
| file(GLOB bins ${dir}/*) | |
| # Iterate through input files | |
| foreach(bin ${bins}) | |
| # Get short filename | |
| string(REGEX MATCH "([^/]+)$" filename ${bin}) |
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
| # Update all the submodules to the latest version: | |
| git submodule foreach git pull origin master | |
| # Prune a git repo of all folders EXCEPT the listed ones | |
| git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- apps/AAA libs/XXX' --prune-empty -- --all | |
| # Remove all empty commits, but keep the commit info (author, date, etc.) | |
| git filter-branch --prune-empty --parent-filter \ | |
| 'sed "s/-p //g" | xargs -r git show-branch --independent | sed "s/\</-p /g"' | |
| #Git command to multiple dirs: | |
| git add .; git commit -m "Removed unecessary dependencies and moved to snapshots"; git push origin master |