This file contains hidden or 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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
This file contains hidden or 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
| /** | |
| * Converts RGB or RGBA format to Hex format. | |
| * e.g. "rgb(28, 166, 171)" -> "#1ca6ab" | |
| * | |
| * @param rgba A color of RGB or RGBA format. | |
| * @return A color of Hex format; | |
| */ | |
| function rgba2hex(rgba) { | |
| var regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/ | |
| parsed = regex.exec(rgba), red, green, blue, alpha, elems; |
This file contains hidden or 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
| // Font Smoothie copyright 2013,14,15 Torben Haase <http://pixelsvsbytes.com> | |
| // Source-URL <https://gist.github.com/letorbi/5177771> | |
| // | |
| // Font Smoothie is free software: you can redistribute it and/or modify it under | |
| // the terms of the GNU Lesser General Public License as published by the Free | |
| // Software Foundation, either version 3 of the License, or (at your option) any | |
| // later version. | |
| // | |
| // Font Smoothie is distributed in the hope that it will be useful, but WITHOUT | |
| // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
This file contains hidden or 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
| /** | |
| * version1: convert online image | |
| * @param {String} url | |
| * @param {Function} callback | |
| * @param {String} [outputFormat='image/png'] | |
| * @author HaNdTriX | |
| * @example | |
| convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
| console.log('IMAGE:',base64Img); | |
| }) |
This file contains hidden or 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
| #!/bin/bash | |
| # Slick Progress Bar | |
| # Created by: Ian Brown (ijbrown@hotmail.com) | |
| # Please share with me your modifications | |
| # Note: From http://stackoverflow.com/questions/11592583/bash-progress-bar | |
| # Functions | |
| PUT(){ echo -en "\033[${1};${2}H";} | |
| DRAW(){ echo -en "\033%";echo -en "\033(0";} | |
| WRITE(){ echo -en "\033(B";} | |
| HIDECURSOR(){ echo -en "\033[?25l";} |
This file contains hidden or 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
| var events = (function(){ | |
| function addRemove(op, events, cb){ | |
| if( cb ) | |
| events.split(' ').forEach(name => { | |
| var ev = name.split('.')[0] | |
| cb = cb || this._eventsNS[name] | |
| this[op + 'EventListener'].call(this, ev, cb) | |
| if(op == 'add') |
This file contains hidden or 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
| $(function() { | |
| // A bit of a hack to track right-click and "Open in New Tab/Window clicks" | |
| $('#div_id a').bind("contextmenu",function(e){ | |
| var d1 = new Date (); | |
| var d2 = new Date ( d1 ); | |
| // Cookies will expire in 10 seconds, so basically the user has 10 seconds to right-click and open the link. | |
| d2.setSeconds ( d1.getSeconds() + 10 ); | |
| $.cookie('right_click_cookie', $(this).attr('href'), { | |
| expires: d2, | |
| path: '/' |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Automate mysql secure installation for debian-baed systems | |
| # | |
| # - You can set a password for root accounts. | |
| # - You can remove root accounts that are accessible from outside the local host. | |
| # - You can remove anonymous-user accounts. | |
| # - You can remove the test database (which by default can be accessed by all users, even anonymous users), | |
| # and privileges that permit anyone to access databases with names that start with test_. |
OlderNewer