Skip to content

Instantly share code, notes, and snippets.

@dcz-switcher
dcz-switcher / nightVisionFilter
Created January 2, 2015 23:11
svg filter night vision
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>svg filter - night vision</title>
<style>
#tile{
-webkit-filter : url(#nightVision);
filter : url(#nightVision);
}
@dcz-switcher
dcz-switcher / angular pikaday directive
Last active August 29, 2015 14:13
angular directive for pikaday
(function () {
/*
// in html :
<link type="text/css" href="pikaday.css" />
<script src="moment.js"></script>
<script src="pikaday.js"></script>
<script src="mx.pikaday.js"></script>
@dcz-switcher
dcz-switcher / angular_focus
Created March 12, 2015 10:19
angular set focus on input field
<!DOCTYPE html>
<html lang="en" ng-app="focusDemo">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body ng-controller="mainController as mainCtrl">
<h1>{{mainCtrl.title}}</h1>
<div>
@dcz-switcher
dcz-switcher / raphaelJS_feedbak_ok
Created March 14, 2015 09:54
raphaelJS animated feedback ok
<script src="vendors/raphael-min.js"></script>
<script>
var playFeedback = function () {
var posX = document.body.clientWidth / 2 - 250,
posY = document.body.clientHeight / 2 - 250,
paper = Raphael(posX, posY, 500, 500);
var circle = paper.circle(210, 195, 0).attr({"fill" : "#4caf50", "stroke": 0});
@dcz-switcher
dcz-switcher / chrome-disable-web-security
Last active July 1, 2022 05:52
launch chrome without security (for local dev only)
#just for local dev
open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-web-security --user-data-dir=""
# if use a proxy and issue with https
open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-web-security --user-data-dir="" --ignore-certificate-errors
@dcz-switcher
dcz-switcher / keybindings.json
Created February 10, 2016 12:34
vscode keybindings.json
[
{ "key": "cmd+d", "command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus" },
{ "key": "ctrl+cmd+down", "command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus" },
{ "key": "ctrl+cmd+up", "command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus" }
]
@dcz-switcher
dcz-switcher / gist:4ddf90e69b98b8d5c6b14edb70d21606
Created October 7, 2016 06:07
how get apk installed on my android device
#get list of installed app
adb shell pm list packages
# ... with filter
adb shell pm list packages | grep facebook # return package:com.facebook.orca
# get apk path
adb shell pm path com.facebook.orca # return /mnt/asec/com.facebook.orca-2/base.apk
# get apk
@dcz-switcher
dcz-switcher / version
Last active October 17, 2016 07:27
sandwich-lastest-version
{
"version": "1.3.0"
}
// ------- HOW DEFINE A SINGLETON FOR VOLLEY REQUEST -------
// original source in Java: https://developer.android.com/training/volley/requestqueue.html
object MySingleton {
val TAG:String = "MySingleton"
var mRequestQueue:RequestQueue? = null
init {
Log.d(TAG, "init")
}
@dcz-switcher
dcz-switcher / ohmyzsh-ystheme-prompt.txt
Last active September 29, 2019 15:16
More lisible prom for "oh my zsh" ys theme
# Current path on first line
# command on second line
# ~/Documents
# $
#
# updatee promt line theme file
# nano .oh-my-zsh/themes/ys.zsh-theme
PROMPT="