Skip to content

Instantly share code, notes, and snippets.

@SvitlanaShepitsena
SvitlanaShepitsena / setup.ps1
Last active December 4, 2015 20:04 — forked from megheaiulian/setup.ps1
Windows 10 setup
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtension -DisableShowProtectedOSFiles
Set-TaskbarOptions -Size Large -Lock -Dock Bottom
# Update Windows and reboot if necessary
@SvitlanaShepitsena
SvitlanaShepitsena / dev_setup.ps1
Created December 4, 2015 19:31 — forked from thitemple/dev_setup.ps1
A PowerShell script for installing a dev machine using Chocolatey.
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
$Boxstarter.NoPassword=$true # Is this a machine with no login password?
Enable-RemoteDesktop
Disable-UAC
Update-ExecutionPolicy Unrestricted # Allow running PowerShell scripts
try {
choco -y install visualstudio2015community
choco install windows-sdk-10.0
if (Test-PendingReboot) { Invoke-Reboot }
Write-ChocolateySuccess 'Done'
} catch {
/*1. самый дешевый телефон с самой большой памятью и черного цвета*/
/*2. чем отличается розовый айфон о
*/
var phones = [
{model:'iPhone',
price: 5500,
color: 'black',
memory: '8GB'},
{model:'iPhone',
price: 6500,
#Special windowsy stuff. see http://boxstarter.org/WinConfig
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
Install-WindowsUpdate
Disable-InternetExplorerESC
Disable-UAC
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
Set-TaskbarOptions -Size Large -Lock -Dock Bottom
Update-ExecutionPolicy
@SvitlanaShepitsena
SvitlanaShepitsena / geo_distance_query.go
Created September 19, 2016 16:56 — forked from olivere/geo_distance_query.go
Elastic geo distance query
package main
import (
"encoding/json"
"fmt"
"log"
"os"
elastic "gopkg.in/olivere/elastic.v3"
)
{"lastUpload":"2019-10-14T20:40:42.002Z","extensionVersion":"v3.4.3"}