Skip to content

Instantly share code, notes, and snippets.

View aquiladev's full-sized avatar
🛩️
Flying

Sergii Bomko aquiladev

🛩️
Flying
View GitHub Profile
@aquiladev
aquiladev / vhd_copy_between_subscriptions.ps1
Last active November 21, 2015 14:52
Windows Azure : Copy VHD between subscriptions
# NOTES: -Source storage should be "Public Container"
# -Doesn't matter which subscription selected
### This assumes you have already imported the azure publishsettings file and the subscriptions are known on your machine.
Select-AzureSubscription -SubscriptionId "2fcd3fbe-9046-4dd3-8916-329df55b6d64"
### Defines the location of the VHD we want to copy
$sourceVhdUri = "https://storage1.blob.core.windows.net/vhds/x1.vhd"
### Defines the source Storage Account
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
choco install visualstudiocode
choco install linqpad
choco install fiddler4
choco install resharper
choco install appfabric.caching
choco install github
choco install 7zip
choco install skype
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
choco install visualstudiocode
choco install linqpad
choco install fiddler4
choco install resharper
choco install appfabric.caching
choco install github
choco install 7zip
choco install skype
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
choco install fiddler4
choco install appfabric.caching
choco install 7zip
choco install skype
choco install notepadplusplus
choco install googlechrome
choco install firefox
function query(continuationToken) {
var query = new azure.TableQuery();
tableService.queryEntities(
table,
query,
continuationToken,
function(error, result, response) {
//HERE IS LOGIC
public class SimpleTransactionSigningInterceptor : RequestInterceptor
{
private readonly AccountSignerTransactionManager _signer;
public SimpleTransactionSigningInterceptor(string privateKey, Web3 web3)
{
_signer = new AccountSignerTransactionManager(web3.Client, privateKey);
}
public override async Task<object> InterceptSendRequestAsync<TResponse>(Func<RpcRequest, string, Task<TResponse>> interceptedSendRequestAsync, RpcRequest request, string route = null)
function sumColoredCells(sumRange) {
var activeRange = SpreadsheetApp.getActiveRange();
var activeSheet = activeRange.getSheet();
var formula = activeRange.getFormula();
var rangeA1Notation = formula.match(/\((.*)\)/).pop();
var range = activeSheet.getRange(rangeA1Notation);
var bg = range.getBackgrounds();
var values = range.getValues();
# Boxstarter options
$Boxstarter.PackageName = "powershell4"
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
#Special windowsy stuff. see http://boxstarter.org/WinConfig
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Disable-InternetExplorerESC
#install some applications
configFileProvider([configFile(fileId: '912637a4-2e56-4ee5-8ad9-caf59a3029a9', variable: 'VAR1')]) {
sh '''
value=`cat $VAR1`
value="$value\nBRANCH_NAME=$BRANCH_NAME"
value="$value\nGIT_COMMIT=$GIT_COMMIT"
echo $value | tee ./build/.env
'''
}
class Program
{
static void Main(string[] args)
{
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
IPAddress broadcast = IPAddress.Parse("192.168.1.102");
byte[] sendbuf = Encoding.ASCII.GetBytes("{11111111111}");
IPEndPoint ep = new IPEndPoint(broadcast, 1700);