Skip to content

Instantly share code, notes, and snippets.

View jjvillavicencio's full-sized avatar

John Villavicencio jjvillavicencio

View GitHub Profile
@NeatSnippets
NeatSnippets / home.dart
Created August 30, 2020 06:52
How to hide bottom navigation bar when scrolling in Flutter
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class Home extends StatefulWidget {
Home({Key key}) : super(key: key);
@override
_HomeState createState() => _HomeState();
}
@jjvillavicencio
jjvillavicencio / main.dart
Created October 22, 2019 20:09 — forked from RajaShanmugamJM/main.dart
Polyline support in Google Maps Flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(Main());
class Main extends StatefulWidget {
@override
_MainState createState() => _MainState();
@jjvillavicencio
jjvillavicencio / form.ts
Created April 23, 2019 19:04 — forked from djabif/form.ts
Ionic Password validator
import { PasswordValidator } from '../../validators/password.validator';
this.matching_passwords_group = new FormGroup({
password: new FormControl('', Validators.compose([
Validators.minLength(5),
Validators.required,
Validators.pattern('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]+$') //this is for the letters (both uppercase and lowercase) and numbers validation
])),
confirm_password: new FormControl('', Validators.required)
}, (formGroup: FormGroup) => {
return PasswordValidator.areEqual(formGroup);
@mrx06
mrx06 / uninstall paragon ntfs 15 full
Created September 3, 2018 17:17
full uninstall paragon ntfs 15 (reset trial)
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
sudo rm -rf /Library/PreferencePanes/ParagonNTFS.prefPane
@fedme
fedme / Ionic Android Development on WSL.md
Last active May 7, 2023 16:21
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@NickFoden
NickFoden / firebase to array
Created March 2, 2018 21:28
Convert Firebase Response Object to an array
// export const snapshotToArray = snapshot => {
// let returnArr = [];
// snapshot.forEach(childSnapshot => {
// let item = childSnapshot.val();
// item.key = childSnapshot.key;
// returnArr.push(item);
// });
// return returnArr;
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@erycamel
erycamel / gist:3f6001209bd5e190e3b172db8cded2eb
Last active July 11, 2018 04:37
Angular 4 & Bootstrap 4 & FontAwesome & JQuery
Angular 4 & Bootstrap 4 & FontAwesome & JQuery
1. Install Bootstrap 4
As of now, Bootstrap 4 is still in alpha stage. This new version requires a newer version of jQuery as well as another component called tether.io which is used for the Bootstrap 4 Tooltips.
To install Bootstrap 4 and its dependencies, open up a terminal in your project’s base folder (where package.json is located) and execute the following commands:
npm install bootstrap@4.0.0-alpha.6 --save
npm install jquery@^3.2.1 --save
npm install tether@^1.4.0 --save
@arteezy
arteezy / puma.service
Last active April 23, 2024 00:31
Manage Puma with systemd and rbenv
[Unit]
Description=Puma Rails Server
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/app/current
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop
@brock
brock / psql-with-gzip-cheatsheet.sh
Last active April 10, 2024 10:53
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database