This file contains 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
# Pre | |
Disable-UAC | |
# System-level configuration | |
Disable-BingSearch | |
Disable-GameBarTips | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock | |
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn |
This file contains 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
# Boxstarter Script (Windows scripted deployment) | |
# github.com/whazzmaster | |
# | |
# Install Boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# Set: Set-ExecutionPolicy RemoteSigned | |
# Then: Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots | |
# | |
# Leverages: |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
main() { | |
previous_file="$1" | |
file_to_edit=`select_file $previous_file` | |
if [ -n "$file_to_edit" ] ; then | |
"$EDITOR" "$file_to_edit" | |
main "$file_to_edit" |
This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch tests", | |
"type": "go", | |
"request": "launch", | |
"mode": "test", | |
"program": "${workspaceRoot}" | |
}, |
This file contains 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
Show hidden characters
{ | |
"presets": [ | |
["env", { | |
"targets": {"node": "8.0"}, | |
"useBuiltIns": true | |
}] | |
], | |
"plugins": [ | |
"transform-object-rest-spread" | |
] |
This file contains 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
#!/usr/bin/env node | |
require('./app.js'); |
This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Increment Command", | |
"cwd": "${workspaceRoot}", | |
"sourceMaps": true, | |
"preLaunchTask": "npm: build", | |
"program": "${workspaceRoot}/dist/bin/app", |
This file contains 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
{ | |
"name": "incrementor", | |
"version": "1.0.0", | |
"description": "increment", | |
"main": "dist/cloud.js", | |
"private": true, | |
"scripts": { | |
"build:lib": "BABEL_ENV=lib $(npm bin)/babel src/ --ignore=src/__mocks__ --out-dir=dist --source-maps", | |
"build:bin": "BABEL_ENV=cli $(npm bin)/babel src/bin/ --out-dir=dist/bin --copy-files --source-maps", | |
"build": "rm -rf dist/ && npm run build:lib && npm run build:bin", |
This file contains 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
import Cloud from '../cloud'; | |
import program from 'commander'; | |
let command, value; | |
const INC_CMD = 'increment'; | |
const DEC_CMD = 'decrement'; | |
program | |
.description('online incrementer: increment cloud-based counters') | |
.arguments('<cmd> [args]') |
This file contains 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
defmodule Identity do | |
# ... | |
defp link_user_and_company(user = %User{}, company = %Company{}) do | |
user = Repo.preload(user, :companies) | |
companies = user.companies ++ [company] | |
|> Enum.map(&Ecto.Changeset.change/1) | |
user | |
|> Ecto.Changeset.change |
NewerOlder