{{ message }}

Instantly share code, notes, and snippets.

# Alex Tercete alextercete

Last active Apr 2, 2020
View wsl+docker+vagrant.md

# WSL 1, Docker and Vagrant+Virtualbox

## Set up Windows

1. Install docker-machine

2. Create a Docker machine named default, sharing D:\ (only one drive can be specified):

Created May 10, 2019
View dictionary-replacer.md

# Dictionary replacer

## Solution

using System;
Last active May 10, 2019
View leap-years.md

# Leap years

## Problem

1. All years divisible by 400 ARE leap years (so, for example, 2000 was indeed a leap year)
2. All years divisible by 100 but not by 400 are NOT leap years (so, for example, 1700, 1800, and 1900 were NOT leap years, NOR will 2100 be a leap year)
3. All years divisible by 4 but not by 100 ARE leap years (e.g., 2008, 2012, 2016)
4. All years not divisible by 4 are NOT leap years (e.g. 2017, 2018, 2019)
Created Jan 2, 2018
Try to find a Makers graduate GitHub CV from their name
View stalk-makers.py
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 argparse import requests def parse_command_line_args(): parser = argparse.ArgumentParser() parser.add_argument('-t', '--token', required=True) parser.add_argument('-n', '--name', required=True) args = parser.parse_args() return args.token, args.name
Last active Oct 22, 2020
Create a docker container for the WideWorldImporters database
View docker-wwi.sh
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
 #!/bin/bash # See: https://docs.microsoft.com/en-us/sql/linux/tutorial-restore-backup-in-sql-server-container SA_PASSWORD= function show_info { tput setaf 6; echo \$1; tput sgr 0 } show_info 'Pulling the container image...'
Created Dec 18, 2017
Optional parameter unexpected behaviour
View Program.cs
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
 using System; using System.Linq; namespace OptionalParameterUnexpectedBehaviour { class Program { static void Main(string[] args) { var numbers = Enumerable.Range(1, 5);
Last active Jan 2, 2020
Install my dotfiles
View dotfiles.sh
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
 #!/bin/sh if [ -z "\$1" ]; then echo "Usage: dotfiles.sh " exit 1 fi if ! hash git 2>/dev/null; then echo 'ERROR: Git needs to be installed!' exit 1
Last active Feb 3, 2017
Remove BOM from all text files tracked by Git
View remove-bom.sh
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
 #!/bin/bash git grep -I --name-only --null \$'\xEF\xBB\xBF' | xargs -0 sed -i '1 s/^\xef\xbb\xbf//'
Last active Oct 14, 2016
View keybase.md

### Keybase proof

I hereby claim:

• I am alextercete on github.
• I am alextercete (https://keybase.io/alextercete) on keybase.
• I have a public key whose fingerprint is B1EE F603 C908 103D B8AA BB5D 3391 C83B 444E 6975

To claim this, I am signing this object:

Last active Aug 29, 2015 — forked from gdvalle/putty-monokai.reg
View putty.reg
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
 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings] "Colour0"="248,248,242" "Colour1"="248,248,242" "Colour2"="39,40,34" "Colour3"="39,40,34" "Colour4"="0,0,0" "Colour5"="255,128,0" "Colour6"="0,0,0"