Skip to content
View gm-fsdfm.php
<?php namespace GM\FSDFM;
/**
* Plugin Name: Fullscreen Distraction-Free Mode (pre v4.1)
* Description: Allows to use the distraction-free mode that was active pre 4.1 WP version.
* Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/c081ce03a68b00d983d5
* Author: Giuseppe Mazzapica
* Author URI: https://gm.zoomlab.it
* License: MIT
* Version: 1.0.0
*/
View scss.scss
.b_imageload {
&__thumbnail {
color: green;
&--profile & {
color: red;
}
}
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View getTpl.js
function getTpl(tpl, options) {
if (!tpl) return;
if (!options) options = null;
var prepare = false;
if (options == 1) {
options = {};
prepare = true;
console.log('prepare');
}
View b_skeletons.js
/** General Skeletons controller */
var Skeletons = Backbone.View.extend({
model: SkeletonsModel,
el: ".b_skeletons",
events: {
},
View socketHelper.js
var socketHelper = function() {
this.clientId = "";
this.getClientId = function() {
return this.clientId;
}
this.address = "localhost";
View deploy.sh
#!/bin/sh
cd ..
grunt release
cd build
echo "compressing..."
tar -cf portal.tgz ../* --exclude=../node_modules --exclude=../tests/node_modules --exclude=../data --exclude=../config/local.json
echo "deploying to server"
scp -r portal.tgz root@server:/root/remote-folder/
echo "updating sources"
ssh root@server "
View jk-nav.js
// Simple J/k navigation for Wordpress
// by Alex Buznik (@beshur)
//
// Change t value for the correct selectors of the items that need to be traversed
(function($) {
$(function() {
var is_blog = true;
if (!$("body").hasClass("blog")) {
is_blog = false;
}
View count_total_project_code_lines_in_sublime
// Go to menue:
// find->find in files
// Switch on reg_ex button
// Find:
^(.*)$
// Where:
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/*
// Then click on the find button
// Be careful to not click on Replace!!!
View hsb.scss
// Simple HSB to HSL converter by Alexander Futekov (@futekov)
// http://www.sitepoint.com/hsb-colors-with-sass/
//
@function hsb($h-hsb, $s-hsb, $b-hsb, $a: 1) {
@if $b-hsb == 0 {
@return hsla(0, 0, 0, $a)
} @else {
$l-hsl: ($b-hsb/2) * (2 - ($s-hsb/100));
$s-hsl: ($b-hsb * $s-hsb) / if($l-hsl < 50, $l-hsl * 2, 200 - $l-hsl * 2);
@return hsla($h-hsb, $s-hsl, $l-hsl, $a);
Something went wrong with that request. Please try again.