Skip to content

Instantly share code, notes, and snippets.

Dinesh dinusuresh

Block or report user

Report or block dinusuresh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View install-docker-elementary-loki.sh
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -u -cs) \
stable"
sudo apt-get update
sudo apt-get purge lxc-docker
@dinusuresh
dinusuresh / manifest.json
Last active Sep 27, 2017
PWA Web Manifest
View manifest.json
{
"name": "PWA Demo Application",
"short_name": "PWA Demo",
"icons": [
{"src": "/assets/icon.png", "sizes": "152x152"},
{"src": "/assets/icon.png", "sizes": "144x144"},
{"src": "/assets/icon.png", "sizes": "192x192"},
{"src": "/assets/icon.png", "sizes": "256x256"},
{"src": "/assets/icon.png", "sizes": "512x512"}
],
View auto-focus.directive.ts
import {AfterViewInit, Directive, ElementRef, OnInit, Optional, Renderer} from '@angular/core';
import {ModalDirective} from 'ng2-bootstrap';
@Directive({
selector: '[appAutoFocus]'
})
export class AutoFocusDirective implements OnInit, AfterViewInit {
constructor(private el: ElementRef, private renderer: Renderer, @Optional() private modal: ModalDirective) {
}
@dinusuresh
dinusuresh / .bashrc
Last active Mar 16, 2017
View git branch name and user email on terminal
View .bashrc
# BEGIN -- git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ >> \1 <</'
}
parse_git_email() {
BRANCH="$(parse_git_branch)"
#echo -ne "$BRANCH"
if [ -n "$BRANCH" ]; then
git config user.email
fi
View gist:6a7139d8508bc7d59db7a9adac6b6b58
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
You can’t perform that action at this time.