Skip to content

Instantly share code, notes, and snippets.

View RayPS's full-sized avatar
🏠
Working from home

Ray RayPS

🏠
Working from home
View GitHub Profile
@RayPS
RayPS / Update Sketch Plugins
Created August 26, 2015 04:18
Update Sketch Plugins
find $HOME/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application\ Support/com.bohemiancoding.sketch3/Plugins -name ".git" -exec git --git-dir={} pull ";"
@RayPS
RayPS / bling.coffee
Created June 23, 2015 08:43
bling.coffee
window.$ = document.querySelectorAll.bind(document)
Node::on = window.on = (name, fn) ->
@addEventListener name, fn
return
NodeList::__proto__ = Array.prototype
NodeList::on = NodeList::addEventListener = (name, fn) ->
@forEach (elem, i) ->
elem.on name, fn
return
@RayPS
RayPS / Simple CSS Layout Debug
Created July 3, 2015 06:54
Simple CSS Layout Debug
*
outline:1px solid #fff!important
background-color:rgba(0,2,54,.1)!important
@RayPS
RayPS / RaysTerminal.itermcolors
Last active October 12, 2015 10:37
My iterm color
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.10049956291913986</real>
<key>Green Component</key>
<real>0.10052110999822617</real>
@RayPS
RayPS / css-pixel-art.css
Last active November 18, 2015 11:41
CSS Pixel Art
img {
/* Chrome */
image-rendering: pixelated;
/* Safari */
image-rendering: -webkit-crisp-edges;
/* Firefox */
image-rendering: -moz-crisp-edges;
@RayPS
RayPS / spiner.sass
Last active July 2, 2016 20:46
Simple css spinner
@keyframes spin
0%
transform: rotate(0deg)
100%
transform: rotate(360deg)
.spinner
width: 50px
height: 50px
border-radius: 50%
@RayPS
RayPS / SpringButton-Extension.swift
Last active July 2, 2016 21:46
UIButton Extension
import UIKit
import Spring
var _scaleFactor: CGFloat = 1
public extension SpringButton {
@nonobjc static let scaleTo = "_scaleTo"
@nonobjc static let scaleBack = "_scaleBack"
@RayPS
RayPS / Framer-CSS-Spiner.coffee
Last active September 26, 2016 17:07
Framer CSS Spiner
spiner = new Layer
borderRadius: "50%"
backgroundColor: false
spiner.style["border"] = "5px solid"
spiner.style["border-color"] = "white white transparent transparent"
spiner.center()
spiner.animate
@RayPS
RayPS / Framer-2D-Collision-Detection.coffee
Created November 23, 2016 09:27
Framer-2D-Collision-Detection
cd = (a, b, c)->
if a.x < b.x + b.width and
a.x + a.width > b.x and
a.y < b.y + b.height and
a.height + a.y > b.y
c()
# a: Layer A
@RayPS
RayPS / my-alias
Last active December 8, 2016 13:59
my alias
alias sketchplugins="~/Library/Application Support/com.bohemiancoding.sketch3/Plugins"
alias macdown="open -a macdown"
alias sss-on='defaults write com.apple.screencapture disable-shadow -bool false; killall SystemUIServer; echo "Screenshot Shadow turned ON."'
alias sss-off='defaults write com.apple.screencapture disable-shadow -bool true; killall SystemUIServer; echo "Screenshot Shadow turned OFF."'