Skip to content

Instantly share code, notes, and snippets.

View dgrijuela's full-sized avatar
👾

Daniel Grijuela dgrijuela

👾
View GitHub Profile
@fuzzyalej
fuzzyalej / functional_javascript.js
Last active August 29, 2015 14:16
Functional JS Workshop
function cell(value) {
return {
value: value,
next: null //null is cool
};
}
function cons(value, list) {
var tmp = cell(value);
tmp.next = list || null;
@MFQ
MFQ / gist:a308a8f05bb87b78c756
Created April 2, 2015 21:55
Mobile-config.js for meteor
App.info({
name: 'Todos',
description: 'A simple todo list app built in Meteor.',
author: 'Percolate Studio Team',
email: 'us@percolatestudio.com',
website: 'http://percolatestudio.com',
version: '0.0.1'
});
App.icons({
@roman01la
roman01la / article_running-web-server-in-clojure.md
Last active January 20, 2017 23:28
Running web server in Clojure

Running web server in Clojure

Install Boot build tool: brew install boot-clj.

For JS people: Boot has a notion of tasks, so it's kind of similar to Grunt/Gulp.

build.boot is yours package.json and gulpfile.

ring-jetty-adapter provides Java's Jetty web framework, compojure is a routing library and hiccup is a lib for writing HTML. The task is defined using deftask macro, it runs run function which we :refer to.

@jamielob
jamielob / Meteor IOS facebook login guide.markdown
Last active April 8, 2017 19:54
Meteor cordova ios facebook login

How to get facebook login working with Meteor and Cordova on iOS

Step 1: Make your local dev site internet accessible

Because there is an issue with OAuth2 login and localhost development, you currently have to deploy your meteor site to be able to test the Facebook login. A nice little workaround for this is to make the local instance of meteor accessible externally.

There is a great online guide for setting up port forwarding with your router and you can check your public external IP here.

For example, If you have an Apple router, simply open up Airport Utility on your Mac and click edit on your router, then go to the Network tab. Under Port Settings click the + icon and select Personal Web Sharing, setting all of the public and private ports to 3000. Make sure the private IP is set to your current computer IP.

@jperl
jperl / Sizes.md
Created October 30, 2014 17:40
Meteor App Icon and Launch Screen Size Guide

###Icons

Name Size
iphone_2x 120x120
iphone_3x 180x180
ipad 76x76
ipad_2x 152x152
android_ldpi 36x36
android_mdpi 48x48
@davidhund
davidhund / pragmatic-touch-icons.md
Last active September 4, 2020 15:42
Pragmatic Touch Icons

NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.

I'd like to hear how you approach this: @valuedstandards or comment on this gist.

The issue

You have to include a boatload of link elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':

![Touch Icon Links](https://o.twimg.com/2/proxy.jpg?t=HBj6AWh0dHBzOi8vcGhvdG9zLTYuZHJvcGJveC5jb20vdC8yL0FBRGFGY1VRN1dfSExnT3cwR1VhUmtaUWRFcWhxSDVGRjNMdXFfbHRJWG1GNFEvMTIvMjI3OTE2L3BuZy8xMDI0eDc2OC8yL18vMC80L1NjcmVlbnNob3QlMjAyMDE1LTA0LTE0JTIwMTYuNTYuMjYucG5nL0NNejBEU0FCSUFJZ0F5Z0JLQUkvNGR1eDZnMzZmYnlzYWI3

@4rn0
4rn0 / gist:3146246
Created July 19, 2012 19:34
Trigger fullscreen HTML5 video on iPad
<!DOCTYPE html>
<html>
<head>
<title>Trigger fullscreen HTML5 video on iPad</title>
<style>
#video { height: 1px; opacity: 0; position: absolute; width: 1px; }
#play { width: 100px; }
</style>
</head>
<body>
@krasnoukhov
krasnoukhov / 2013-01-07-profiling-memory-leaky-sidekiq-applications-with-ruby-2.1.md
Last active October 4, 2023 21:53
Profiling memory leaky Sidekiq applications with Ruby 2.1

My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.

As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.

I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.

So, in order to profile your worker, add this to your Sidekiq configuration:

if ENV["PROFILE"]
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')