Skip to content

Instantly share code, notes, and snippets.

View pongstr's full-sized avatar
:octocat:

pongstr pongstr

:octocat:
View GitHub Profile
@pongstr
pongstr / Package Control.sublime-settings
Last active September 18, 2020 15:17
Sublime Text 3 Settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"GitGutter",
"Package Control",
"SideBarEnhancements",
@pongstr
pongstr / bash.md
Last active September 26, 2022 11:44
Bash useful commands :D

dirs

# display the directory stack vertically, prefixing each
# entry with its index in the stack.
$ dirs -v

# cd and push the path to the directory stack.
$ pushd /path/to/directory
@pongstr
pongstr / docker-cleanup-resources.md
Created July 5, 2017 03:34 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

# Pico+
DialerFramework # Install Dialer Framework
CalSync # Install Google Calendar Sync (except if Google Calendar is being installed)
GoogleTTS # Install Google Text-to-Speech (Micro+ on 5.0-, Pico+ on 6.0+)
PackageInstallerGoogle # Install Google Package Installer
# Nano+
BatteryUsage # Install Device Health Services (7.1+)
FaceDetect # Install Face Detect library for photo apps
@pongstr
pongstr / app.js
Created February 20, 2017 00:42 — forked from katowulf/app.js
Simple paginate example in AngularFire with Firebase.util (http://firebase.github.io/firebase-util/)
var app = angular.module('app', ['firebase']);
app.controller('ctrl', function($scope, $pageArray) {
$scope.pageItems = $pageArray(ref, 'number');
});
app.factory('$pageArray', function($firebaseArray) {
return function(ref, field) {
// create a Paginate reference
var pageRef = new Firebase.util.Paginate(ref, field, {maxCacheSize: 250});
@pongstr
pongstr / _readme.md
Created February 12, 2017 08:23
ExpressJS: Nested Routing
@pongstr
pongstr / local.js
Created January 5, 2017 20:27
Local Time: Original code from https://goo.gl/RNt2BP
'use strict';
const local = (gmt) => {
const now = new Date()
return new Date((now.getTime() + (now.getTimezoneOffset() * 60000)) + (3600000 * gmt))
}
console.log(local('+2')) //--> Thu Jan 05 2017 22:07:51 GMT+0200 (EET)
@pongstr
pongstr / angular-material-dashboard.markdown
Created December 23, 2016 18:04
Angular Material Dashboard
@pongstr
pongstr / LICENSE.txt
Created December 13, 2016 04:42 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Works on Chrome
// Doesn't work on Firefox, need to transpile first.
;(function (angular) { 'use strict'
// Main Controller Class
class MainCtrllr {
constructor ($scope, $window, $timeout, pouchDB) {
// Initialize Angular JS Services
this.$scope = $scope