Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View xilikas's full-sized avatar

Fil Lawrence Luzadas xilikas

View GitHub Profile
@xilikas
xilikas / .eslintrc.js
Last active March 24, 2019 14:37
Scott Tolinski's ESLint Config. Must install eslint-config-airbnb for it to work.
// Must install eslint-config-airbnb
module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true
},
"settings": {
"ecmascript": 6,
@xilikas
xilikas / bash.sh
Created February 14, 2019 02:52
Common bash commands
. ~/.bashrc # restart bash
@xilikas
xilikas / ef.md
Last active December 31, 2018 22:11
Useful EF Commands
- dotnet ef database update

Create database using migration schema

- dotnet ef database drop 

Delete entire database

- dotnet ef migrations add <Migration Name> 

Creates a new migration with provided name (does not apply migration to database without update)

  • dotnet ef migrations remove
app.get("/", (req, res) => res.send("Hello")); // ES6 arrow notation
docker build . --tag <name>: create image of Dockerfile in current directory with a name
docker ps : List all running containers
docker run -it <container> /bin/bash : Run interactive terminal (e.g. bash) on container
docker logs <container> : Logs of specified container
docker rm <container> : removes one or more containers
docker rm $(docker ps -aq) : removes all stopped containers
@xilikas
xilikas / fcc-product-landing-page.markdown
Created June 13, 2018 17:24
FCC: Product Landing Page
@xilikas
xilikas / fcc-survey-form.markdown
Last active June 13, 2018 17:05
FCC: Survey Form
@xilikas
xilikas / getWeather.js
Created May 19, 2018 21:25
Ajax Function for getting weather from FCC Weather API (https://fcc-weather-api.glitch.me) using longitude and latitude passed in as arguments.
function getWeather(latitude, longitude) {
$.ajax({
type: 'GET',
url: 'https://fcc-weather-api.glitch.me/api/current?lat='
+ latitude + '&lon=' + longitude,
async: false,
contentType: "application/x-www-form-urlencoded",
cache: false,
dataType: 'json',
success: function(data)