Skip to content

Instantly share code, notes, and snippets.

@phongjalvn
phongjalvn / package.json
Created May 9, 2012 06:06
Basic npm package for Meteor
{
"name": "Meteor",
"version": "0.3.2",
"description": "A new way to build apps.",
"author": "Meteor Development Group",
"homepage": "http://www.meteor.com/",
"repository": {
"url": "https://github.com/meteor/meteor"
},
"dependencies": {
@phongjalvn
phongjalvn / container.html
Created May 9, 2012 06:06
How to implement a router in Meteor-0.3.2
/* It calls the content helper, and then load the Template matching the route :
for exemple, /user/list will load the template "user_list"
It's not optimum but it works
*/
<template name="container">
<div class="container">
{{#content}}
{{/content}}
</div>
</template>
@phongjalvn
phongjalvn / edit.html
Created May 9, 2012 06:06 — forked from gabriel-dehan/edit.html
Meteor wysiwyg livedata
<template name="editor">
<div class="well {{#if editor_mode}}editor-show{{/if}}" id="editor">
<textarea id="editor-area" placeholder="Enter your text ...">{{get_file}}</textarea>
</div>
</template>
@phongjalvn
phongjalvn / gist:2667115
Created May 12, 2012 15:13 — forked from jcbozonier/gist:1240614
Creating an image proxy in Node.js/Expressjs
app.get('/proxied_image/:image_url', function(request_from_client, response_to_client){
sys.puts("Starting proxy");
var image_url = request_from_client.params.image_url;
var image_host_name = url.parse(image_url).hostname
var filename = url.parse(image_url).pathname.split("/").pop()
var http_client = http.createClient(80, image_host_name);
var image_get_request = http_client.request('GET', image_url, {"host": image_host_name});
image_get_request.addListener('response', function(proxy_response){
@phongjalvn
phongjalvn / dabblet.css
Created May 18, 2012 17:17 — forked from LeaVerou/dabblet.css
Scrolling shadows by @kizmarh and @LeaVerou
/**
* Scrolling shadows by @kizmarh and @leaverou
* Only works in browsers supporting background-attachment: local; & CSS gradients
* Degrades gracefully
*/
html {
background: white;
font: 120% sans-serif;
}
@phongjalvn
phongjalvn / dabblet.css
Created May 18, 2012 17:19 — forked from LeaVerou/dabblet.css
Text masking — The SVG way
/**
* Text masking — The SVG way
*/
svg {
width: 6em; height: 1.5em;
font: 900 500%/1.2 'Arial Black', sans-serif;
}
text { fill: url(#wood); }
.btn-download-one{
text-transform: capitalize;
font: bold 34px arial, helvetica, sans-serif;
float: left;
padding: 4px 4px 0 4px;
overflow: hidden;
}
.btn-download-one:link,
.btn-download-one:visited{
text-decoration: none;
{"version":"1.1","settings":{"fontsize":"100","prefixfree":"1"},"view":[{"template":"r\nc","active":false,"seethrough":false},{"template":"r\nh","active":true,"seethrough":false},{"template":"r","active":false,"seethrough":false}]}
@phongjalvn
phongjalvn / playground.css
Created June 5, 2012 05:46
remember to define focus styles!
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
@phongjalvn
phongjalvn / playground.css
Created June 5, 2012 05:46
remember to define focus styles!
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;