Skip to content

Instantly share code, notes, and snippets.

View ChrisAnn's full-sized avatar
👩‍💻
codez, codez, codez

Chris ChrisAnn

👩‍💻
codez, codez, codez
View GitHub Profile
@jamiegs
jamiegs / BundleConfig.ps1
Created July 1, 2016 19:16 — forked from mefellows/BundleConfig.ps1
Sysprepped Windows AMI using Packer
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
foreach ($element in $xmlElement.Property)
{
if ($element.Name -eq "AutoSysprep")
{
$element.Value="Yes"
}
@mefellows
mefellows / BundleConfig.ps1
Last active December 25, 2023 23:33
Sysprepped Windows AMI using Packer
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
foreach ($element in $xmlElement.Property)
{
if ($element.Name -eq "AutoSysprep")
{
$element.Value="Yes"
}
@Su-Shee
Su-Shee / gist:5d1a417fa9de19c15477
Last active June 23, 2024 13:15
Falsehoods Programmers Believe About "Women In Tech"

Falsehoods Programmers Believe About "Women In Tech"

  • We have absolutely no idea what we're doing in tech. Please explain the utmost basic things to us.

  • We only do web design. Our whole reason of being in tech is to make things pretty. Consider us the doilies of the industry.

  • We're not laughing about your joke, so we clearly need you explain it to us. In great detail.

  • We're only in tech to find a husband, boyfriend or generally to get laid.

First, you install ruby-build and chruby. ruby-build is a program that knows how to download and build different ruby versions. chruby manages $PATH to control which ruby gets invoked in your shell. They work completely independently.

sudo su
cd /usr/src

git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
./install.sh
cd -
@nbarnwell
nbarnwell / Invoke-PackageUpdate
Last active August 8, 2018 14:51
Update specific packages based on wildcard (or regex pattern) using PowerShell outside the Visual Studio Package Manager Console. Caveat: I'm not a PowerShell expert and I'm pretty sure there must be terser ways to accomplish the same, but the command-line argument requirements of nuget.exe required this to be more complex than I'd have liked. :)
gci -r -inc packages.config |
%{
([xml](get-content $_)).packages.package.id |
Add-Member -NotePropertyName 'PackageConfigFile' -NotePropertyValue $_ -PassThru
} |
?{ $_ -like 'MyCompany.*' } |
%{ nuget.exe update $_.PackageConfigFile -Id $_ -RepositoryPath (join-path (split-path (Split-Path $_.PackageConfigFile)) 'packages') }
anonymous
anonymous / stupid 2.6.py
Created November 19, 2013 06:18
stupid 2.6 bot for robotgame
import random
import math
import rg
def around(l):
return rg.locs_around(l)
def diag(l1, l2):
if rg.wdist(l1, l2) == 2:
if abs(l1[0] - l2[0]) == 1:
@bhang
bhang / install_graphite_statsd_ubuntu_precise.sh
Created May 15, 2012 17:41
Install Graphite and statsd on Ubuntu 12.04 LTS (Precise Pangolin)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git
@DVDPT
DVDPT / gist:1607680
Created January 13, 2012 17:34
RestSharp Async for windows phone 7
public static class RestSharpExtensions
{
public static Task<IRestResponse<T>> ExecuteAsync<T>(this IRestClient client, IRestRequest request) where T : new()
{
return client.ExecuteAsync<T>(request, CancellationToken.None);
}
public static Task<IRestResponse<T>> ExecuteAsync<T>(this IRestClient client, IRestRequest request, CancellationToken token) where T : new()
{
# These are my notes from the PragProg book on CoffeeScript of things that either
# aren't in the main CS language reference or I didn't pick them up there. I wrote
# them down before I forgot, and put it here for others but mainly as a reference for
# myself.
# assign arguments in constructor to properties of the same name:
class Thingie
constructor: (@name, @url) ->
# is the same as: