- Left Option key acts as "Meta"
- Right Option key acts as "Meta"
Opt+→
sends escape sequence off
Opt+←
sends escape sequence ofb
- Add
Opt+←Delete
sends hex code17
This file contains 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
class Allocation < AR::Base | |
# allocations schema | |
# - line_item_id - indexed | |
# - type - string [ ‘CreditAllocation’, ‘DebitAllocation’ ] - indexed | |
# - allocatable_id - integer - indexed | |
# - amount - integer | |
belongs_to :line_item | |
belongs_to :allocatable, class_name: ‘LineItem’ | |
end |
This file contains 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
# from https://github.com/discourse/discourse/blob/21e08a423e8839c6bacb4ee688b924a4fb71113f/lib/middleware/turbo_dev.rb | |
# lib/middleware/turbo_dev.rb | |
module Middleware | |
# Cheat and bypass Rails in development mode if the client attempts to download a static asset | |
# that's already been downloaded. | |
# |
This file contains 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
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# ' | |
\set PROMPT2 '[more] %R > ' | |
-- By default, NULL displays as an empty space. Is it actually an empty | |
-- string, or is it null? This makes that distinction visible. | |
\pset null '[NULL]' | |
-- Use table format (with headers across the top) by default, but switch to | |
-- expanded table format when there's a lot of data, which makes it much | |
-- easier to read. | |
\x auto | |
-- Verbose error reports. |
This file contains 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
{"title":"Anonymous Gistbook","author":"Anonymous","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<h1>test</h1>"},{"type":"css","source":"h1 { color: red; }"},{"type":"javascript","source":"alert('welcome to the internet');"}]}],"public":true} |
This file contains 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
export default React.createClass({ | |
// ... | |
render () { | |
const style = { | |
WebkitTransform: 'translateY(' + this.state.translatedYPosition + ')' | |
} | |
let containerClassString = this.state.containerExpanded ? LeftNavConstants.CONTAINER_EXPANDED : LeftNavConstants.CONTAINER_COLLAPSED | |
if (this.state.containerHighlighted) containerClassString += ' ' + LeftNavConstants.CONTAINER_HIGHLIGHTED |
This file contains 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
vjs.MediaTechController.prototype.emulateTextTracks = function() { | |
var player = this.player_, | |
textTracksChanges, | |
tracks, | |
script; | |
if (!window['WebVTT']) { | |
script = document.createElement('script'); | |
script.src = player.options()['vtt.js'] || '../node_modules/vtt.js/dist/vtt.js'; | |
player.el().appendChild(script); |
This file contains 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
<?php | |
// controller | |
function wutangclan() { | |
$this->load->model('odb'); | |
$data['killerbees'] = $this->odb->getThatPaper(); | |
$data['main_content'] = 'report/dashboard'; // main body view, can be whatever | |
$this->load->view('includes/template', $data); | |
?> | |
============ |
This file contains 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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
if ( ! function_exists('image_thumb_helper')){ | |
function image_thumb($image_path, $filename, $height, $width){ | |
$filename = preg_replace('/\.png/','_',$filename); | |
// Get the CodeIgniter super object | |
$CI =& get_instance(); | |
// Path to image thumbnail | |
$image_thumb = dirname($image_path) . '/'.$filename . $height . '_' . $width . '.png'; | |
if( ! file_exists($image_thumb)){ | |
// LOAD LIBRARY |
This file contains 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
\b((?:(?<!:)(?:1?[0-9])(?::(?<!\d)[0-5]\d)?(?:\s?[ap][m]?)?)(?:\s?-\s?)(?<=-|\s)(?:(?:1?[0-9])(?::(?<!\d)[0-5]\d)?(?:\s?[ap][m]?)))\b |
OlderNewer