Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

arvi

🎯
Focusing
  • Laguna, Philippines
View GitHub Profile
@arvi
arvi / gist-sublime-testing.js
Created Sep 29, 2013
testing sublime gist package
View gist-sublime-testing.js
function gist_sublime (argument) {
console.log('testing sublime gist package');
}
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
View anchor-target-blank.js
var links = document.querySelectorAll('article.content a');
for (var i = 0, length = links.length; i < length; i++) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank';
}
}
View sticky-footer-with-flexbox.html
View concrete5.7-enabling-grid-framework.php
<?php
namespace Application\Theme\MyThemeName;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {
//just telling the theme that it supports a particular grid framework, in this case Bootstrap 3
protected $pThemeGridFrameworkHandle = 'bootstrap3';
View upload-file-image.js
//JS
$(function () {
$(":file").change(function () {
if (this.files && this.files[0]) {
var reader = new FileReader();
reader.onload = imageIsLoaded;
reader.readAsDataURL(this.files[0]);
}
});
});
View typography-vertical-rhythym-guide.scss
//source:https://scotch.io/tutorials/aesthetic-sass-3-typography-and-vertical-rhythm
@import url(https://fonts.googleapis.com/css?family=Raleway:400,200,600);
$container-width: 750px;
$container-height: 440px;
$base-font-size: 1rem;
$base-line-height: 1.25 * $base-font-size;
@arvi
arvi / sublime-jsx-emmet-trigger.json
Created Jun 6, 2016
Sublime Key Binding cheatsheet
View sublime-jsx-emmet-trigger.json
[
//jsx emmet tab trigger: https://gist.github.com/wesbos/2bb4a6998635df97c748
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
View css-horizontal-text-separator.css
.separator {
display: flex;
align-items: center;
text-align: center;
}
.separator::before, .separator::after {
content: '';
flex: 1;
border-bottom: 1px solid #000;
}