This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export static class CacheService { | |
// static $inject = ["localStorageService", "$rootScope", "$timeout"] | |
private static ls : localStorageService = undefined; // wrap localstorage to hide data | |
private static instance : CacheService = undefined; | |
private callables : Object = {}; | |
private asyncCallables : Object = {}; | |
constructor(ls : any, rootScope : any, timeout : any) { | |
if(!this.instance) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# youtube url player for raspberry pi, | |
# ------------------------------------------------------------------ | |
ytdlCmd="youtube-dl"; | |
ytdlArgs="-f 140 --prefer-ffmpeg -g"; # 141 - 256k audio, 140 - 128k audio, 22 - best quality available | |
playerCmd="omxplayer"; | |
playerArgs="--vol -300"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# System Update | |
pacman --noconfirm -Syu | |
#The essentials | |
pacman --noconfirm -S base-devel vim git | |
# Packer (AUR Helper) | |
cd /tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# all variables found so far | |
# execute the below line for all events | |
# ~/bin/libnotify-skype.sh "%type" "%sname" "%sskype" "%smessage" "%fpath" "%fname" "%fsize" "%fprogress" "%fspeed" | |
# below line prints all the param values on any event | |
# notify-send "$1 $2 $3 $4 $5 $6 $7 $8 $9"; | |
# shorthand for notification | |
notif () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# default location of theme and wallpaper | |
# replace 'awtheme' with your current theme | |
wallpaperDestination="$HOME/.config/awesome/themes/awtheme/wallpaper"; | |
# add #include "/home/arch/.Xresources_colors" to .Xresources | |
colorScriptDestination="/home/arch/.Xresources_colors" | |
# add [[ -f "$HOME/.bash_colors" ]] && . "$HOME/.bash_colors"; to .bashrc | |
# bashColorsDestination="/home/arch/.bash_colors" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function #from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
import http.server, urllib, datetime, json | |
#================================================================= | |
sUrl="/testServer" #server url | |
port=8000 #server port | |
#================================================================= | |
# data | |
#================================================================= | |
jsonDict = { | |
"login" : { # sent at login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sessionPWD="/home/$USER/"; | |
sessionName="new-session"; #must be same as filename | |
#check if already created | |
cd ${sessionPWD}; | |
#create SESSION | |
tmux new-session -s ${sessionName} -n vim -d | |
#first window 1: vim | |
tmux send-keys -t ${sessionName} 'vim' C-m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python2.7 | |
import os, sys, re | |
from PIL import Image, ImageChops, ImageOps | |
def show_usage () : | |
print("""Simple JPEG to monitor sized wallpaper generator\nDeps: PIL(2.7)\nUsage:\n[python2.7] %s /path/to/image [/path/to/outfile] [WIDTHxHEIGHT]\n""" % (sys.argv[0],)) | |
def makeThumb(f_in, f_out, size=(80,80), pad=False): | |
image = Image.open(f_in) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
loginPortal=""; #link to send the post req to | |
userName=""; #username for logging into the service | |
password=""; #password | |
dynDnsUpdateLink=""; #link to update the dynDNS service. | |
firstNumber01=""; #first number to precede the IP say 101.*.*.* | |
firstNumber02=""; #alternate | |
#get an ip beginning with $firstNumber01 or $firstNumber02 else reconnect |
NewerOlder