Terminal command to zip up files excluding unwanted Icon and DS_Store files
zip my_zip_file.zip -r dir_to_zip -x "*Icon*" "*.DS_Store"
# export dump | |
mysqldump -u [username] -p[password] [dbname] | gzip > ~/[dbname].sql.gz | |
# import | |
mysql -u username -p database_name < file.sql |
@mixin ltr (){ | |
@content; | |
} | |
@mixin rtl (){ | |
.rtl & { @content; } | |
} | |
@mixin direction-start ($param, $value) { | |
@include ltr { #{$param}-left: $value; } |
app.factory('storage', function() { | |
var store = {} | |
function set(key, data) { | |
store = data; | |
localStorage.setItem( key, JSON.stringify( data ) ); | |
} | |
function get( key ) { |
Terminal command to zip up files excluding unwanted Icon and DS_Store files
zip my_zip_file.zip -r dir_to_zip -x "*Icon*" "*.DS_Store"
A good "ready-to-use tool" option could be http-server:
npm install http-server -g
To use it:
cd D:\Folder
http-server
Or, like this:
Open up httpd.conf
(/Applications/MAMP/conf/apache/httpd.conf)
Uncomment the line under Virtual Hosts:
Looks like this:
# Virtual hosts
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Should look like this:
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot "/Users/username/code/wp" | |
ServerName wp.website.com | |
ServerAlias wp.website.com | |
ServerAlias wp-website.*.xip.io | |
ErrorLog "logs/error_log_website.log" | |
<Directory "/Users/username/code/wp/"> | |
Options Indexes FollowSymLinks Includes | |
AllowOverride All |
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
=language | |
$language: "Greek" | |
.Greek & | |
@content |
Regular expressions are a powerful tool for examining and modifying text. Regular expressions themselves, with a general pattern notation almost like a mini programming language, allow you to describe and parse text. They enable you to search for patterns within a string, extracting matches flexibly and precisely. However, you should note that because regular expressions are more powerful, they are also slower than the more basic string functions. You should only use regular expressions if you have a particular need.
This tutorial gives a brief overview of basic regular expression syntax and then considers the functions that PHP provides for working with regular expressions.
The Basics Matching Patterns Replacing Patterns Array Processing