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
$env:Path += ";C:\Chocolatey\bin" | |
choco install ChocolateyGUI | |
choco install git poshgit | |
choco install VisualStudio2013Professional | |
choco install python pip easy.install | |
choco install notepadplusplus SublimeText3 aptana-studio | |
choco install winmerge linqpad4 SourceTree dotPeek SourceCodePro ScriptCs sqliteadmin HxD | |
choco install sysinternals filezilla winscp putty fiddler4 windirstat lockhunter wireshark truecrypt rdcman nmap | |
choco install GoogleChrome Firefox flashplayerplugin adobereader | |
choco install skype xnview adobereader vlc dropbox teamviewer paint.net 7zip curl Wget |
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
/* | |
The following SQLite query reverts all the photos in a Lightroom collection the next-to-last step in their edit history | |
It was initially provided by Dorin Nicolaescu-Musteață | |
Execution steps: | |
1. Create a Lightroom collection named "UndoLastOperation" and add the over-edited photos | |
2. Close Lightroom and backup the catalog | |
3. Open the .lrcat file (usually from C:\Users\<User>\Pictures\Lightroom) in SQLite Administrator (http://sqliteadmin.orbmu2k.de/) | |
4. Run this file (Copy-Paste + F9) | |
5. Close SQLite Administrator |
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-ExecutionPolicy Unrestricted | |
Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents" | |
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Set-TaskbarSmall | |
Enable-RemoteDesktop | |
cinst ChocolateyGUI | |
# dev tools | |
cinst VisualStudio2013Professional |
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
Get-NetTCPConnection -RemotePort 25 -ErrorAction SilentlyContinue | Format-Table |
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
static string GetSsoUrl(string baseUrl, string secret, string name, string email) { | |
var timems = (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds.ToString(); | |
return String.Format("{0}/login/sso?name={1}&email={2}×tamp={3}&hash={4}", | |
baseUrl, Server.UrlEncode(name), Server.UrlEncode(email), timems, GetHash(secret, name, email, timems)); | |
} | |
private static string GetHash(string secret, string name, string email, string timems) { | |
var input = name + secret + email + timems; | |
var keybytes = Encoding.Default.GetBytes(secret); | |
var inputBytes = Encoding.Default.GetBytes(input); |
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: https://stackoverflow.com/questions/2729126/how-to-find-column-names-for-all-tables-in-all-databases-in-sql-server | |
SELECT | |
s.name as ColumnName | |
,sh.name+'.'+o.name AS ObjectName | |
,o.type_desc AS ObjectType | |
,CASE | |
WHEN t.name IN ('char','varchar') THEN t.name+'('+CASE WHEN s.max_length<0 then 'MAX' ELSE CONVERT(varchar(10),s.max_length) END+')' | |
WHEN t.name IN ('nvarchar','nchar') THEN t.name+'('+CASE WHEN s.max_length<0 then 'MAX' ELSE CONVERT(varchar(10),s.max_length/2) END+')' | |
WHEN t.name IN ('numeric') THEN t.name+'('+CONVERT(varchar(10),s.precision)+','+CONVERT(varchar(10),s.scale)+')' | |
ELSE t.name |
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 class FeedStorage | |
{ | |
public FeedStorage() | |
{ | |
GroupStoryChildIdList = ""; | |
} | |
[PrimaryKey] | |
public string Id { get; set; } | |
public DateTime FeedItemDateTime { get; set; } | |
public string ItemType { get; set; } |
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
tcpping.exe google.com:80 | |
nameresolver.exe google.com |
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
############################################################################## | |
## Original version @ https://gallery.technet.microsoft.com/scriptcenter/Powershell-Script-for-13a551b3 | |
## Updated: 5/26/2015, Version 2.0, By: Sangamesh (sangameshb@yahoo) on 5/26/2015 | |
############################################################################## | |
param ( | |
[string]$url = 'https://google.com', | |
[switch]$t = $true, | |
[switch]$help | |
) |
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
### WINDOWS ### | |
# option #1: generic version, from here: https://gallery.technet.microsoft.com/scriptcenter/Get-ExternalPublic-IP-c1b601bb | |
Invoke-RestMethod http://ipinfo.io/json | Select -exp ip | |
# option #2: Azure metadata service | |
(Invoke-RestMethod -H @{'Metadata'='true'} "http://169.254.169.254/metadata/instance?api-version=2017-08-01").network.interface.ipv4.ipAddress.publicIpAddress | |
### LINUX ### | |
dig +short myip.opendns.com @resolver1.opendns.com |
OlderNewer