Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View centurianii's full-sized avatar

centurianii centurianii

View GitHub Profile
@centurianii
centurianii / CodeMirror.5.36.0.copy.cut.js
Last active September 27, 2018 11:06
Patch CodeMirror to trigger custom events on copy/cut to be used with a local buffer
// there are 2 patches, also see: https://github.com/codemirror/CodeMirror/issues/5594
// line 8703
function onCopyCut(e) {
if (signalDOMEvent(cm, e)) { return }
if (cm.somethingSelected()) {
setLastCopied({lineWise: false, text: cm.getSelections()})
if (e.type == "cut") { cm.replaceSelection("", null, "cut") }
} else if (!cm.options.lineWiseCopyCut) {
return
} else {
@centurianii
centurianii / buffer.js
Last active September 25, 2018 20:15
A global buffer (proposed for CodeMirror visual cut/copy/paste)
/**
* @summmary
* window.utils
* ------------
* @desc
* A global object with utility functions.
* @var {Object} window.utils
*/
window.utils = window.utils || {};
@centurianii
centurianii / login_form.css
Last active January 3, 2016 20:59
The firsLogin form
/**
* Login form
*/
html, body {
height: 100%;
}
body {
background-color: #D9DEE2;
background-image: -moz-linear-gradient(center top , #EBEEF2, #D9DEE2);
font: 12px 'Lucida Sans Unicode','Trebuchet MS',Arial,Helvetica;
@centurianii
centurianii / buttons_n_entities.css
Last active January 3, 2016 20:59
Buttons & entities
/**
* Buttons & entities
*/
.button
{
display: inline-block;
white-space: nowrap;
background-color: #ccc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc));
background-image: -webkit-linear-gradient(top, #eee, #ccc);
@centurianii
centurianii / progress_bar.css
Last active January 3, 2016 20:58
Progress bar
/**
* Progress bar
*/
.progress-bar {
background-color: #1a1a1a;
height: 25px;
padding: 5px;
width: 350px;
margin: 50px 0;
-moz-border-radius: 5px;
@centurianii
centurianii / breadcrumbs.css
Last active January 3, 2016 20:49
Breadcrumbs
/**
* Breadcrumbs
*/
ul{
margin: 0;
padding: 0;
list-style: none;
}
/* First */
@centurianii
centurianii / tucked_corners.css
Last active January 3, 2016 20:49
Tucked corners
/**
* Tucked corners
*/
.tucked-corners-top {
position: relative;
width: 500px; min-height: 200px;
margin: 50px auto; padding: 20px;
background-color: #cccccc; /* Fallback */
background: linear-gradient(45deg, transparent 10px, #cccccc 10px),
linear-gradient(135deg, transparent 10px, #cccccc 10px),
@centurianii
centurianii / pricing_table.css
Last active January 3, 2016 20:49
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
#pricing-table {
margin: 50px auto;
text-align: center;
width: 892px; /* total computed width = 222 x 3 + 226 */
}
#pricing-table .plan {
@centurianii
centurianii / button_bckgnds.css
Last active January 3, 2016 20:39
Button backgrounds
/**
* Button backgrounds
*/
.boxes {
list-style: none outside none;
margin: 10px auto;
overflow: hidden;
padding: 0px;
width: 300px;
@centurianii
centurianii / sticker_shadow.css
Last active January 3, 2016 20:39
Sticker shadow
/**
* Sticker shadow
*/
body:before
{
content: "";
position: fixed;
top: -10px;
left: 0;
width: 100%;