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
a.fb:hover { | |
color: #3B5998; | |
} | |
a.inst:hover { | |
color: #fb3958; | |
} | |
a.pin:hover { | |
color: #C92228; | |
} |
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
# To add a new screenshot | |
## First cd to directory and then type | |
svn add assets/screenshot-5.jpg | |
# and now commit | |
svn ci -m "added new screenshot for user profile" assets/screenshot-5.jpg |
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
.parallax-section { | |
position: relative; | |
width: 100%; | |
height:700px; | |
} | |
.parallax-child-section { | |
clip: rect(0, auto, auto, 0); | |
position: absolute; | |
top: 0; | |
left: 0; |
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
add_filter( 'authenticate', 'chk_active_user',100,2); | |
function chk_active_user ($user, $password) { | |
$user_data = $user->data; | |
$user_id = $user_data->ID; | |
if(is_super_admin($user_id)) { | |
add_filter('authenticate', 'wp_authenticate_username_password', 20); | |
//add_filter( 'authenticate', 'wp_authenticate_email_password', 20, 3 ); | |
//add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); |
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 | |
// Complete the repeatedString function below. | |
function repeatedString($s, $n) { | |
$find_a = substr_count($s, "a"); | |
if($find_a > 1 && $n < 100000000000){ | |
$total_repeated_string = str_repeat($s, $n); | |
$actual_string = substr($total_repeated_string, 0, $n); |
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 React from 'react' | |
import {useStaticQuery, graphql} from 'gatsby' | |
const Repository = () => { | |
let imgAray = ['prj-01', 'prj-01', 'prj-03', 'prj-04', 'prj-05']; | |
let images = imgAray.map(image => { | |
return <img key={image} src={require(`../images/uploads/portfolio/${image}.jpg`)} alt="" /> |
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
{ | |
resolve: 'gatsby-source-github', | |
options: { | |
headers: { | |
Authorization: `Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`, | |
}, | |
queries: [ | |
`{ | |
viewer { | |
pinnedItems(first: 50, types: REPOSITORY) { |
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
if ( function_exists( 'add_theme_support' ) ) { | |
add_filter( 'manage_posts_columns' , 'frontlash_add_custom_columns' ); | |
add_action( 'manage_posts_custom_column' , 'frontlash_add_thumbnail_columns_data', 10, 2 ); | |
add_action( 'manage_posts_custom_column' , 'frontlash_add_modified_author_columns_data', 10, 2 ); | |
} | |
function frontlash_add_custom_columns( $columns ) { | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'title' => 'Title', |
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
add_action( 'wp_enqueue_scripts', 'mears_scripts'); | |
function mears_scripts(){ | |
wp_enqueue_script( 'mears-infinite-scroll', get_stylesheet_directory_uri() . '/vendor/infinite-scroll/infinite-scroll.pkgd.min.js', array('jquery'), null, true ); | |
wp_enqueue_script( 'mears-history', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery'), null, true ); | |
} |
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 | |
function distinct($input){ | |
$result = array_unique($input); | |
sort($result); | |
$key = array_search(1, $result); | |
if(false !== $key): | |
array_push($result, 1); | |
endif; | |
print_r($result); |