This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # There are 3 levels of git config; project, global and system. | |
| # project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
| # global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
| # system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
| # Create a project specific config, you have to execute this under the project's directory. | |
| $ git config user.name "John Doe" | |
| # Create a global config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| cabal configure && cabal build && cabal haddock --hyperlink-source \ | |
| --html-location='/package/$pkg-$version/docs' \ | |
| --contents-location='/package/$pkg' | |
| S=$? | |
| if [ "${S}" -eq "0" ]; then | |
| cd "dist/doc/html" | |
| DDIR="${1}-${2}-docs" | |
| cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}" | |
| CS=$? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| from selenium import webdriver | |
| import unittest, time, re | |
| from random import choice | |
| correctanswers = [] | |
| def tryitnow (): | |
| # Copy and paste the module url below, including the key: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{tufte-handout} | |
| %% Just draws a baseline grid on the page | |
| \usepackage{pagegrid} | |
| \pagegridsetup{ | |
| top-left, | |
| step=\baselineskip, | |
| arrowlength=1pt, | |
| } | |
| % End baseline grid code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "\e[1~": beginning-of-line | |
| "\e[4~": end-of-line | |
| "\e[5~": history-search-backward | |
| "\e[6~": history-search-forward | |
| "\e[3~": delete-char | |
| "\e[2~": quoted-insert | |
| "\e[5C": forward-word | |
| "\e[5D": backward-word | |
| "\e\e[C": forward-word | |
| "\e\e[D": backward-word |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Utilities for managing database sessions.""" | |
| from __future__ import with_statement | |
| import contextlib | |
| import functools | |
| @contextlib.contextmanager | |
| def temp_session(session_cls, **kwargs): | |
| """Quick and dirty context manager that provides a temporary Session object | |
| to the nested block. The session is always closed at the end of the block. |
NewerOlder