Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
Standalone JavaScript function that removes JavaScript and HTML restrictions that block pasting, editing, or autofilling text fields (like email or password inputs) on a web page.
(function() {
document.querySelectorAll('input, textarea').forEach(el => {
el.removeAttribute('onpaste');
el.onpaste = null;
el.removeAttribute('readonly');| #!/bin/bash | |
| while : | |
| do | |
| clear | |
| git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
| sleep 1 | |
| done |
| // LZW-compress a string | |
| function lzw_encode(s) { | |
| var dict = {}; | |
| var data = (s + "").split(""); | |
| var out = []; | |
| var currChar; | |
| var phrase = data[0]; | |
| var code = 256; | |
| for (var i=1; i<data.length; i++) { | |
| currChar=data[i]; |
Do I want to die on this hill?
Am I including everyone?
| from fabric.api import * | |
| """ | |
| Base configuration | |
| """ | |
| env.project_name = '$(project)' | |
| env.database_password = '$(db_password)' | |
| env.site_media_prefix = "site_media" | |
| env.admin_media_prefix = "admin_media" | |
| env.newsapps_media_prefix = "na_media" |
| username: vagrant | |
| password: vagrant | |
| sudo apt-get update | |
| sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
| sudo aptitude install mysql-server mysql-client | |
| sudo nano /etc/mysql/my.cnf |
| #!/bin/bash | |
| # --------------------------------------------------------- | |
| # Customizable Settings | |
| # --------------------------------------------------------- | |
| MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}" | |
| VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}" | |
| VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}" | |
| VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}" |
| # -*- coding: utf-8 -*- | |
| import os | |
| from flask import Flask | |
| from flask_heroku import Heroku | |
| from flask_sslify import SSLify | |
| from raven.contrib.flask import Sentry | |
| from flask.ext.celery import Celery |
| #!/usr/bin/osascript | |
| # usage: zoom <room-number> [room-password] [--name=NAME] | |
| on split(theString, theDelimiter) | |
| set oldDelimiters to AppleScript's text item delimiters | |
| set AppleScript's text item delimiters to theDelimiter | |
| set theArray to every text item of theString | |
| set AppleScript's text item delimiters to oldDelimiters | |
| return theArray |