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 SITE = SITE || {}; | |
| SITE.fileInputs = function() { | |
| var $this = $(this), | |
| $val = $this.val(), | |
| valArray = $val.split('\\'), | |
| newVal = valArray[valArray.length-1], | |
| $button = $this.siblings('.button'), | |
| $fakeFile = $this.siblings('.file-holder'); | |
| if(newVal !== '') { |
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 BrowserDetect() { | |
| var browser, version, OS, versionSearchString, | |
| body = document.getElementById('body'); | |
| function init () { | |
| browser = searchString(dataBrowser) || ""; | |
| version = searchVersion(navigator.userAgent) || searchVersion(navigator.appVersion) || ""; | |
| OS = searchString(dataOS) || ""; | |
| body.className = body.className + ' ' + browser + ' ' + browser + '_' + version + ' ' + OS; | |
| destroy(); |
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
| <?php defined('BASEPATH') OR exit('No direct script access allowed.'); | |
| /** | |
| * Character Limiter Mid | |
| * | |
| * Limits the string representing the characters removed from somewhere from | |
| * their mid. This limiter considers the output string as two parts (start and | |
| * end) and not preserves complete words, so you also can chose exactly how many | |
| * characters at start and end you need have. | |
| * |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
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
| SC._detectBrowser = function(userAgent, language) { | |
| var version, webkitVersion, browser = {}; | |
| userAgent = (userAgent || navigator.userAgent).toLowerCase(); | |
| language = language || navigator.language || navigator.browserLanguage; | |
| version = browser.version = (userAgent.match(/.*(?:rv|chrome|webkit|opera|ie)[\/: ](.+?)([ \);]|$)/) || [])[1]; | |
| webkitVersion = (userAgent.match(/webkit\/(.+?) /) || [])[1]; | |
| browser.windows = browser.isWindows = !! /windows/.test(userAgent); | |
| browser.mac = browser.isMac = !! /macintosh/.test(userAgent) || (/mac os x/.test(userAgent) && !/like mac os x/.test(userAgent)); | |
| browser.lion = browser.isLion = !! (/mac os x 10_7/.test(userAgent) && !/like mac os x 10_7/.test(userAgent)); | |
| browser.iPhone = browser.isiPhone = !! /iphone/.test(userAgent); |
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 http = require('http'), | |
| util = require('util'), | |
| formidable = require('formidable'), | |
| server; | |
| server = http.createServer(function(req, res) { | |
| if (req.url == '/') { | |
| res.writeHead(200, {'content-type': 'text/html'}); | |
| res.end( | |
| "<div align='center'>"+ |
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/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
| Array | |
| ( | |
| [0] => 1889883229 | |
| [1] => 488835183 | |
| [2] => 550593395 | |
| [3] => 763493425 | |
| [4] => 1932858889 | |
| [5] => 2095048392 | |
| [6] => 1762303890 | |
| [7] => 1408443226 |
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
| #!/usr/bin/env bash | |
| echo ">>> Starting Install Script" | |
| # Update | |
| sudo apt-get update | |
| # Install MySQL without prompt | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
OlderNewer