Skip to content

Instantly share code, notes, and snippets.

View EnTeQuAk's full-sized avatar

Christopher Grebs EnTeQuAk

  • Mozilla
  • Berlin, Germany
View GitHub Profile
@EnTeQuAk
EnTeQuAk / rails_resources.md
Created November 28, 2013 16:06 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@EnTeQuAk
EnTeQuAk / javascript_resources.md
Created November 28, 2013 16:06 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@EnTeQuAk
EnTeQuAk / 0_reuse_code.js
Created November 28, 2013 16:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
da
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
select * from (
select distinct on (id) * from (
select core_feeditem.id, COALESCE(recipes_recipe_translation.republished_at, recipes_recipe_translation.published_at) as "ordering"
from core_feeditem
join recipes_recipe on core_feeditem.id = recipes_recipe.feeditem_ptr_id
join recipes_recipe_translation
on recipes_recipe.feeditem_ptr_id = recipes_recipe_translation.master_id
join unnest(array['de','en']) with ordinality as u(lang,priority) on recipes_recipe_translation.language_code=u.lang
union all
{
"query": {
"filtered": {
"filter": {
"or": [
{
"and": [
{
"type": {
"value": "article"
@EnTeQuAk
EnTeQuAk / gist:1164566
Created August 23, 2011 07:28 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Python Data Processing Developer
Favorite Python project: Flask
Favorite Conference: DjangoCon for now...
Python Experience Level: About 6 years
@EnTeQuAk
EnTeQuAk / gist:1162553
Created August 22, 2011 14:54
Redesign Checklist
[ ] Convert Twitter-Bootstrap to SCSS
[ ] Activate HTML5 Doctype
[ ] Remove Custom DTD-File, check that everything works
[ ] Create a preview page to give an overview about what is done and what must be done (http://twitter.github.com/bootstrap/ as an example)
[ ] Create new SCSS-Namespace, move old files and start hacking till the preview page looks fine
[ ] Check all other pages (Create automatic Link)
curl -XPOST 'http://127.0.0.1:9200/forum/post/_search' -d '{"query": {"filtered": {"filter": {"script": {"params": {"forums": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "script": "forums contains doc[\"forum_pk\"].value"}}, "query": {"query_string": {"query": "forum_pk:2", "default_operator": "AND"}}}}, "explain": true}'