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 | |
| function split_street(string $streetStr) :array { | |
| $aMatch = array(); | |
| $pattern = '#^([\w[:punct:] ]+) (\d{1,5})\s?([\w[:punct:]\-/]*)$#'; | |
| preg_match($pattern, $streetStr, $aMatch); | |
| $street = $aMatch[1] ?? $streetStr; | |
| $number = $aMatch[2] ?? ''; | |
| $numberAddition = $aMatch[3] ?? ''; | |
| return array('street' => $street, 'number' => $number, 'numberAddition' => $numberAddition); | |
| } |
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
| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
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 | |
| function require_auth() { | |
| $AUTH_USER = 'admin'; | |
| $AUTH_PASS = 'admin'; | |
| header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
| $has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
| $is_not_authenticated = ( | |
| !$has_supplied_credentials || | |
| $_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
| $_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
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
| # Installation --- | |
| # 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables. | |
| # 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir) | |
| # 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
| # push everything and initialize GitFTP) | |
| # | |
| # Usage --- | |
| # - On each commit to master branch, it'll push all files to the $FTP_HOST | |
| # - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises | |
| # - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all) |
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
| # How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 ) | |
| # on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) | |
| # without using Razer's official uninstall tool. | |
| # Tested on OS X 10.11.5 in July 2016. | |
| # Edited with additional steps for later OS X versions, | |
| # contributed by commenters on this gist. | |
| # Step 1: In your terminal: stop and remove launch agents | |
| launchctl remove com.razer.rzupdater |
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-face { | |
| font-family: 'RobotoDraft'; | |
| font-style: normal; | |
| font-weight: 400; | |
| src: local('RobotoDraft'), local('RobotoDraft-Regular'), url(https://fonts.gstatic.com/s/robotodraft/v1/0xES5Sl_v6oyT7dAKuoni4gp9Q8gbYrhqGlRav_IXfk.woff2) format('woff2'), url(https://fonts.gstatic.com/s/robotodraft/v1/0xES5Sl_v6oyT7dAKuoni7rIa-7acMAeDBVuclsi6Gc.woff) format('woff'); | |
| } | |
| @font-face { | |
| font-family: 'RobotoDraft'; | |
| font-style: normal; |
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 | |
| # Migrate ISPConfig 3 installation from one server to another | |
| # This script should run on the final/destination ISPConfig 3 server | |
| # You must first install the same ISPConfig on the destination server | |
| # and make sure to create all the users from the previous installation | |
| # (ISPConfig creates users for each client and web page) | |
| # Tested on ISPConfig version 3.0.5.3 | |
| # Created by Jorge Barnaby (@jbarnaby) - March 2014 | |
| # EDIT YOUR PREVIOUS ISPCONFIG SERVER HERE |
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
| # ------------------------------------------------------------------------------ | |
| # | |
| # Curtousy of the Magento Support Center | |
| # http://magentosupport.help/what-are-expires-headers-and-how-do-i-implement-them/ | |
| # | |
| # ------------------------------------------------------------------------------ | |
| # ------------------------------------------------------------------------------ | |
| # | Mod Caching via Apache | |
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
| /* Magnific Popup CSS */ | |
| //////////////////////// | |
| // | |
| // Contents: | |
| // | |
| // 1. Default Settings | |
| // 2. General styles | |
| // - Transluscent overlay | |
| // - Containers, wrappers |
NewerOlder

