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
// Convert PX to REM | |
$browser-context: 16; // Default | |
@function rem($pixels, $context: $browser-context) { | |
@return #{$pixels/$context}rem; | |
} | |
// Margin/Padding helpers | |
$step : 5; | |
$from : 0; | |
$through : ceil( 100 /$step); |
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
/* Helpers */ | |
@font-face { | |
font-family: "Roboto"; | |
src: url("../fonts/Roboto/Roboto-Regular.woff") format("woff"); | |
font-weight: normal; | |
} | |
@font-face { | |
font-family: "Roboto"; | |
src: url("../fonts/Roboto/Roboto-Bold.woff") format("woff"); |
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
if ( ! function_exists( 'function_name_given' ) ) : | |
/** * get the value of view. */ | |
function function_name_given($postID) { | |
$count_key = 'wpb_post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count ==''){ | |
$count = 1; | |
delete_post_meta($postID, $count_key); | |
add_post_meta($postID, $count_key, '1'); | |
} else { |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
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
div { | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
width: 50%; | |
} |
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
{ | |
"exclude": ["node_modules/**"], | |
"always-semicolon": true, | |
"color-case": "upper", | |
"block-indent": "\t", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": false, | |
"leading-zero": false, | |
"quotes": "double", |
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
{ | |
"exclude": [".git/**", "node_modules/**", "bower_components/**"], | |
"always-semicolon": true, | |
"block-indent": " ", | |
"color-case": "upper", | |
"color-shorthand": false, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": true, | |
"quotes": "double", |
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 | |
//@EVAL return $modx->runSnippet('getDepartament'); | |
$pdo = $modx->getService('pdoFetch'); | |
$pdo->setConfig(array( | |
'parents' => 137, | |
'limit' => 0, | |
'sortby' => 'id', | |
'select' => 'id,pagetitle', | |
'return' => 'data', | |
'where' => [ |
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 | |
// $modx->log($modx::LOG_LEVEL_ERROR,'Testing my custom hook.'); | |
$email = $hook->getValue('subscribe-email'); | |
$base_path = $modx->getOption('base_path'); | |
$fp = fopen($base_path . 'subscribe/subscribe_db.txt', 'a+'); | |
$matches = false; | |
$lines = file($base_path . 'subscribe/subscribe_db.txt'); // reads a file into a array with the lines | |
foreach ($lines as $line) { |
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
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do | |
echo " $file" | |
mv $file $file.icv |
NewerOlder