Skip to content

Instantly share code, notes, and snippets.

@beata
beata / ROOT.js
Last active April 13, 2018 07:39
Require module defined in react-native-config
# src/Root.js
import theme from 'APP_THEME'; // extraNodeModule defined in `rn-cli.config.js`
class Root extends Component {
store = getStore()
render() {
return (
<Provider store={this.store}>
<script>if(Function('/*@cc_on return 10===document.documentMode@*/')()){document.documentElement.className='ie10';}</script>
@beata
beata / dabblet.css
Created November 5, 2012 11:36
svg: clip-path
/**
* svg: clip-path
*/
.outline {
fill: none;
stroke: pink;
stroke-width: 2;
transition: stroke-width, stroke 0.6s;
}
image:hover + .outline {
@beata
beata / dabblet.css
Created November 5, 2012 06:37
svg animateMotion
/* svg animateMotion */
#talk {
fill: white;
stroke: orange;
stroke-width: 3;
}
#ball {
fill: url(#blueGradient);
}
@beata
beata / gist:3950351
Created October 25, 2012 04:02
OSX Port 80 Forwarding (optional, but recommended)

Nginx runs under your own user, so it can't use a privileged port. Instead it runs on port 8080. You may want to have it run on port 80, and if so you can add a simple firewall script to forward the port. (This is totally optional.)

cd /Library/LaunchDaemons
sudo curl -O https://raw.github.com/gist/945906/d817356fb5db195c7c4c46fd39f5f5cac6db6e8f/com.coverallcrew.firewall.plist

sudo launchctl load -w com.coverallcrew.firewall.plist

@beata
beata / itunes-radio-search
Created March 29, 2012 08:38
Bash script to search itunes radio channels
@beata
beata / haml-watch
Created December 1, 2011 08:55
Watch and compile all haml files on a directory, like sass --watch
#!/usr/bin/env ruby
# Script to watch a directory for any changes to a haml file
# and compile it.
#
# USAGE: ruby haml_watch.rb <directory_to_watch>
#
# Blake Smith / http://blakesmith.github.com/2010/09/05/haml-directory-watcher.html
#
require 'rubygems'
@beata
beata / vim自動關閉符號
Created August 27, 2010 19:42
vim的括號自動閉合
vnoremap $1 <esc>`>a)<esc>`<i(<esc>
vnoremap $2 <esc>`>a]<esc>`<i[<esc>
vnoremap $3 <esc>`>a}<esc>`<i{<esc>
vnoremap $33 <esc>`>a }}<esc>`<i{{ <esc>
vnoremap $35 <esc>`>a %}<esc>`<i{% <esc>
vnoremap $$ <esc>`>a"<esc>`<i"<esc>
vnoremap $q <esc>`>a'<esc>`<i'<esc>
vnoremap $w <esc>`>a"<esc>`<i"<esc>
ino {% {% %}<esc>:let leavechar='}'<CR>hhi
ino {{ {{ }}<esc>:let leavechar='}'<CR>hhi