Skip to content

Instantly share code, notes, and snippets.

View yuyuvn's full-sized avatar
🍰

Clicia Scarlet (Phan Duc) yuyuvn

🍰
  • Money Forward
  • Tokyo, Japan
View GitHub Profile
@yuyuvn
yuyuvn / powershell-web-server.ps1
Created June 5, 2018 16:34 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
function Load-Packages
{
param ([string] $directory = 'Packages')
$assemblies = Get-ChildItem $directory -Recurse -Filter '*.dll' | Select -Expand FullName
foreach ($assembly in $assemblies) { [System.Reflection.Assembly]::LoadFrom($assembly) }
}
Load-Packages
$routes = @{
@yuyuvn
yuyuvn / gh-pages-deploy.md
Created February 14, 2018 03:12 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@yuyuvn
yuyuvn / ec2-host-from-tag-to-env-vars.sh
Last active August 16, 2016 10:26 — forked from marcellodesales/ec2-host-from-tag-to-env-vars.sh
Create Environment Variables in EC2 Hosts from EC2 Host Tags, just like Beanstalk or Heroku does!
######
# Author: Marcello de Sales ([email protected])
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags
#
### Requirements:
# * Install jq library (sudo apt-get install -y jq)
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825)
#
### Installation:
# * Add the Policy EC2:DescribeTags to a User