Skip to content

Instantly share code, notes, and snippets.

@jayuloy
jayuloy / python_conversion.md
Last active August 29, 2015 14:23 — forked from Nurdok/python_conversion.md
Python Number Conversion #python

Python Number Conversion Chart

From To Expression
@jayuloy
jayuloy / 0_reuse_code.js
Last active August 29, 2015 14:23
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
@jayuloy
jayuloy / javascript_resources.md
Last active August 29, 2015 14:23 — 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
@jayuloy
jayuloy / python_resources.md
Last active August 29, 2015 14:23 — 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

@jayuloy
jayuloy / css_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

import requests
from bs4 import BeautifulSoup as bs
from itertools import chain, filterfalse
langs = {'python': ['(py)', '(pypy)', '(py3)'],
'ruby': ['(rb)']}
def get_pids(maxpage=17):
  1. generate an empty migration
  2. move the migration from old_app to new_app
  3. edit the migration file to change all instances of old_app to new_app
  4. add a forward migration to rename the table from something to something_else
  5. add a backward migration to do the opposite
  6. move models.py from old_app to new_app
  7. apply the migration
@jayuloy
jayuloy / notes.md
Created January 25, 2016 16:14 — forked from DavidWittman/notes.md
A Brief Introduction to Fabric

A Brief Introduction to Fabric

Fabric is a deployment management framework written in Python which makes remotely managing multiple servers incredibly easy. If you've ever had to issue a change to a group servers, this should look pretty familiar:

for s in $(cat servers.txt); do ssh $s service httpd graceful; done

Fabric improves on this process by providing a suite of functions to run commands on the servers, as well as a number of other features which just aren't possible in a simple for loop. While a working knowledge of Python is helpful when using Fabric, it certainly isn't necessary. This tutorial will cover the steps necessary to get started with the framework and introduce how it can be used to improve on administering groups of servers.

@jayuloy
jayuloy / GoogleAPI.py
Created June 7, 2016 13:47 — forked from SalvaJ/GoogleAPI.py
Example making HTTP request to use Google API without api-client.It works in Python3 (tested ok in 3.3.5)
#!usr/bin/python3
# -*- coding: UTF-8 -*-
"""This module is a sample of the OAuth2 authentication by Python3"""
__version__ = "0.1.0"
__author__ = "shin (shin.hateblo.jp)"
__copyright__ = "(C) 2012 shin"
__email__ = "s2pch.luck@gmail.com"
__license__ = "Apache License 2.0"
@jayuloy
jayuloy / 기술 문서를 쓸 때 주의해야 할 몇 가지.md
Created August 14, 2016 08:45 — forked from 9beach/기술 문서를 쓸 때 주의해야 할 몇 가지.md
기술 문서를 쓸 때 주의해야 할 몇 가지를 나열합니다.

기술 문서를 쓸 때 주의해야 할 몇 가지

텍스트 파일의 장점

자신이 하는 일이 소모적인 일회성의 일이 아니라고 여긴다면 위키에 글을 작성해서 보편적인 방식으로 공유하라. 글을 읽고 의문이 생기는 것에 대한 토론은 글 안에서 이루어지는 것이 좋다. 중요한 정보를 위키 혹은 RCS, Git 등으로 관리되는 텍스트가 아닌, 워드, 파워포인트 등의 이진 문서로 작성해서 올릴 때마다 당신의 동료는 그 정보에 대한 접근성, 가시성, 버전 관리 문제로 고통을 겪을 것이다.

명징한 소재

잡다한 소재가 하나의 글에 다 들어가 있으면 재활용성, 접근성, 발전 가능성이 떨어진다. 자기완결적인 항목들로 페이지를 나눔으로써 정보로서의 가치가 더 커진다. 나중에 나눌 의향으로 일단 쓰고 보는 것은 환영한다. 고민 하면서 글쓰기를 미루는 것보다는 일단 쓰는 것이 중요하다.