Skip to content

Instantly share code, notes, and snippets.

View yornaath's full-sized avatar
🔥
buidling

Yornaath yornaath

🔥
buidling
View GitHub Profile
@yornaath
yornaath / jquery.mobile.event.js
Created September 3, 2011 12:48 — forked from aaronrussell/jquery.mobile.event.js
Slightly modified version of jQuery Mobile's event handlers so can be used standalone without the rest of the framework
/*
* jQuery Mobile Framework : events
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function($, undefined ) {
$.extend( $.support, {
orientation: "orientation" in window,
<?php
public function __get($name, $value) {
if ($name == "tariff" && get_called_class() != get_class($this)) {
return (intval($this->$name) / 100);
} else if ($name == "durationType" && get_called_class() != get_class($this)) {
} else {
return $this->$name;
}
}
@yornaath
yornaath / gist:2881718
Created June 6, 2012 13:04 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@yornaath
yornaath / gist:2881720
Created June 6, 2012 13:04 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@yornaath
yornaath / plink-plonk.js
Created February 26, 2020 11:29 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@yornaath
yornaath / DraftLineNumbers.js
Created March 12, 2020 12:08 — forked from schabluk/DraftLineNumbers.js
Display line numbers is Draft-JS Editor
// Required Draf-js version: 0.10.
// Live example: https://jsfiddle.net/schabluk/gh2gt22n/
import React from 'react'
import ReactDOM from 'react-dom'
import {Editor, EditorState, EditorBlock} from 'draft-js'
class Line extends React.Component {
render () {
const blockMap = this.props.contentState.getBlockMap().toArray()