// global req.
npm i -g @angular/cli
edit git commit details
git rebase -i 0abc12def // <- the commit before the one that needs edit
// use vi to change "pick" to "edit" on the commit(s) that need edits, then write/quit
git commit --amend --author="Christopher Snay <[email protected]>"
// write/quit vi
git rebase --continue // <- repeat until all edited commits complete
git push -f
Scaffold a MySql database from .NET Core
PM> Scaffold-DbContext "server=IP.ADD.RE.SS;user=dbuser;password=dbpass;database=dbname" MySql.Data.EntityFrameworkCore -o dbname -f
Requirement:
Microsoft.EntityFrameworkCore.Tools
Different providers:
MySql.Data.EntityFrameworkCore
Microsoft.EntityFrameworkCore.SqlServer
Install Logstash plugins
logstasn\bin\logstash-plugin install json-filter
Start Elasticsearch, Kibana, and Logstash
elasticsearch\version\bin\elasticsearch.exe
kibana\bin\kibana.bat
logstash\bin\logstash -f ..\config\logstashconfig.conf -r
Delete data from Elasticsearch
// deletes all data
curl -XDELETE localhost:9200/*
// deletes index
curl -XDELETE localhost:9200/indexname
Angular setup
// create new app
ng new <PROJECT_NAME>
cd <PROJECT_NAME>
// install angular material
npm i @angular/material @angular/animations @angular/cdk hammerjs
// generate components
ng g c <COMPONENT_NAME>
// generate services
ng g s <SERVICE_NAME>
Undo git changes forcibly
git reset --hard HEAD
compare 2 files with Visual Studio
// open cmd
<<<path to Visual Studio\Common7\IDE>>>devenv /diff file1 file2
Or just create a batch file. Example:
@echo off
echo Drag and drop the first file onto this window. Then press [ENTER]
set /p file1=
echo Drag and drop the second file onto this window. Then press [ENTER]
set /p file2=
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /diff %file1% %file2%
Initial git push via HTTPS
git init
git remote add origin https://<<<repo>>>.git
git add .
git commit -m "some comments"
git push -u origin master
format curl json
curl -X GET "http://api/path" -H "accept: application/json" | python -mjson.tool
Check raspberry pi temp
./opt/vc/bin/vcgencmd measure_temp
Flip
An Android game created with Android Studio basic UI components. It’s a basic “Shut the Box” dice game.
Lisbon Recycling
A free Android app for Lisbon, Connecticut residents. It was mainly created to keep track of which week is your recycling week, but also includes the town’s quarterly newsletter. It implements Google Maps API.
Is It Recycling Day?
A website for Lisbon residents to check which week is their recycling week. It uses Google Maps API.www.isitrecyclingday.com (changed to) www.lisbonrecycling.com