Skip to content

Instantly share code, notes, and snippets.

View dideler's full-sized avatar

Dennis Ideler dideler

View GitHub Profile
@dideler
dideler / python_resources.md
Created May 12, 2014 18:03 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@dideler
dideler / 0_reuse_code.js
Created May 12, 2014 18:03
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
@dideler
dideler / screenshots.js
Last active September 30, 2022 16:33 — forked from nhoizey/screenshots.js
Quick way to take screenshots of webpages at different sizes. Not very efficient, but can make it fast later.
#!/usr/bin/env casperjs
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js example.com
*/
@dideler
dideler / coursera.html
Last active March 18, 2024 09:53 — forked from kevingessner/gist:9509148
Responsive emails that work
<div id=":vz" class="ii gt m145ad5537035869c adP adO"><div id=":vy" class="a3s" style="overflow: hidden;"><div><div class="adM">
</div><div bgcolor="#fafafa"><div class="adM">
</div><table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#fafafa"><tbody><tr><td align="left" valign="middle" height="40" bgcolor="#e4eff7" style="color:#787878;font-family:Arial;padding:5px 30px 5px 30px">
<div style="font-size:14px;letter-spacing:1px;font-weight:bold;color:#787878"><a href="https://eventing.coursera.org/redirect/K94Ky5AdlhxW-FQnYSZZtJPNSf_mKt0SlLY3BJoPtzGpi9uZUEt5y2t4OE_LPJ_BCElO-LwczCh98rRU3vjkFA.KYet1zUYKuWJE3yZ5nv7dQ.ew5zeZYivcmzO41tPxqLBchVIzZJsUl86CrpCEZL-BqfouGmyTiOsoHV6zgPWIft-5F1i2Ug42EeeOJS1yfZ-yZdoMF_Oc5dO2aP7vtdCqLHEQLkq4-vHwBL8nGe-T7Lypqw5CtuKyoVwWGNHb0s-n1mM3r5RfTIVyrGJYV4m8NKQI-m4K18qD0fszw5u0_OxR_24DUqzkXqfMfOD9_MwhEkfow89tPO2CYoYdWths3E9TQ3gK_KdRjJRm8AfgKVyacIGbanQ3tUENlDUy_E7E9YMuAmYCXUHe02U2p5FlEQW7LnDqTtG3MYC3uVCOW46Bs3_oIFzlryBTrariC7y1s3KXDtwE83vBW9t65D62
@dideler
dideler / gist:10892406
Last active August 29, 2015 13:59
Farewell CanCan. May CanCanCan live long and prosper.
Thanks for your submission! The [ryanb/cancan][] repository has been inactive since Sep 06, 2013.
Since only Ryan himself has commit permissions, the CanCan project is on a standstill.
CanCan has many open issues, including missing support for Rails 4. To keep CanCan alive, an active fork exists at **[cancancommunity/cancancan][]**. The new gem is [cancancan][]. More info is available at #994.
It would be really appreciated if you resubmit your pull request or issue to [CanCanCan][cancancommunity/cancancan].
We hope to see you on the other side!
[ryanb/cancan]: https://github.com/ryanb/cancan
@dideler
dideler / apple.md
Last active January 6, 2024 15:12
Great job postings. Highlighting ideal qualities of a developer.

You can move quickly through various full-stack troubleshooting tasks in our mission-critical distributed system; You are highly motivated to create extremely reliable, secure and performant pieces of software and processes; You are constructive and you take feedback well, incorporating it in your day-to-day tasks; Your communication skills are stellar, even when operating under stress; You don’t just hack something together; You craft incredibly polished pieces of code; Test driven development comes naturally to you; Reducing your code coverage is not an option for you; You have astonishing tracking skills; Your bugs are always up-to-date and your projects are delivered on time.

From a RoR job posting by Apple Inc.

@dideler
dideler / routes.md
Last active April 8, 2024 04:15
Rails Routes

A summary of the Rails Guides on Routes, plus other tips.

The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.

Examples

# Redirects /orders/report to orders#report.
get 'orders/report', to: 'orders#report'
@dideler
dideler / css.md
Last active April 8, 2024 04:17
CSS Tips

Vertical centering

position: absolute;
top: 50%;
transform: translateY(-50%);

Translate is processed at the end, meaning it is based on the final element height. This means it works with any element, even dynamic heights. Of course it only works on relatively new browsers, but translate is well accepted and on the path to being ubiquitous. The style is also easy to understand and isn't hacky.

@dideler
dideler / you-cant-win-an-argument.md
Last active September 11, 2023 11:03
People skills. Excerpts from "How to win friends and influence people"

The raconteur mentioned that the quotation was from the Bible. He was wrong. I knew that, I knew it positively. There couldn't be the slightest doubt about it. And so, to get a feeling of importance and display my superiority, I appointed myself as an unsolicited and unwelcome committee of one to correct him. He stuck to his guns.

What? From Shakespeare? Impossible! Absurd! That quotation was from the Bible. And he knew it.

The storyteller was sitting on my right; and Frank Gammond, an old friend of mine, was seated at my left. Mr. Gammond had devoted years to the study of Shakespeare, So the storyteller and I agreed to submit the question to Mr. Gammond. Mr. Gammond listened, kicked me under the table, and then said: "Dale, you are wrong. The gentleman is right. It is from the Bible."

On our way home that night, I said to Mr. Gammond: "Frank, you knew that quotation was from Shakespeare,"

"Yes, of course," he replied, "Hamlet, Act Five, Scene Two. But we were guests at a festive occasion, my dear Dale. W

@dideler
dideler / publish
Last active March 27, 2017 19:13
A script to build and deploy your Sphinx (http://sphinx-doc.org) documentation. Use it if you have your reStructuredText files in one repo, and your published HTML docs in a separate GitHub pages repo.
#!/bin/bash
# Builds the HTML documentation files from the reStructuredText source,
# then copies the HTML files created by Sphinx, from the 'freeseer-docs' repo
# to the 'freeseer.github.io' repo. Finally, publishes the updated
# documentation by staging the files, commiting, and pushing them.
#
# A one-line commit message for git is an optional argument.
#
# Author(s):