This file contains 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 | |
/** | |
* Extended Walker class for use with the | |
* Twitter Bootstrap toolkit Dropdown menus in Wordpress. | |
* Edited to support n-levels submenu. | |
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640 | |
* @license CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
class BootstrapNavMenuWalker extends Walker_Nav_Menu { |
This file contains 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 | |
/** | |
* @param string $domain Pass $_SERVER['SERVER_NAME'] here | |
* @param bool $debug | |
* | |
* @debug bool $debug | |
* @return string | |
*/ | |
function get_domain($domain, $debug = false) | |
{ |
This file contains 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
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
This file contains 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 | |
if [ ! $(whoami) = 'root' ]; then | |
echo "This script should be run as root." > /dev/stderr | |
exit 1 | |
fi | |
spinner() | |
{ | |
local pid=$! |
This file contains 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 | |
## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/ | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
## software and associated documentation files (the "Software"), to deal in the Software | |
## without restriction, including without limitation the rights to use, copy, modify, | |
## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
## permit persons to whom the Software is furnished to do so, subject to the following | |
## conditions: |
This file contains 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
import Darwin | |
public func arc4random <T: IntegerLiteralConvertible> (type: T.Type) -> T { | |
var r: T = 0 | |
arc4random_buf(&r, UInt(sizeof(T))) | |
return r | |
} | |
public extension UInt { | |
public static func random(lower: UInt = min, upper: UInt = max) -> UInt { |
This file contains 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
-- AppleScript to create a new file in Finder | |
-- | |
-- Use it in Automator, with the following configuration: | |
-- - Service receives: no input | |
-- - In: Finder.app | |
-- | |
-- References: | |
-- - http://apple.stackexchange.com/a/129702 | |
-- - http://stackoverflow.com/a/6125252/2530295 | |
-- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript |
This file contains 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 | |
class OpenCartValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
OlderNewer