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
var instagramUrl = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=myToken&callback=?&limit=1&count=12'; | |
var recruiterboxUrl = 'https://jsapi.recruiterbox.com/v1/openings?client_name=myAccountName&limit=5'; | |
// Instagram Media Load | |
var loadFeed = function(url, callback) { | |
$.ajax({ | |
url: url, | |
dataType: 'json', | |
success: function(response) { |
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
// Sometimes it's necessary to do a bit of clean-up | |
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) { | |
el.removeAttribute('data-confirm'); | |
el.click(); | |
}); |
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
function limit_word_count($title) { | |
$len = 5; //change this to the number of words | |
if (str_word_count($title) > $len) { | |
$keys = array_keys(str_word_count($title, 2)); | |
$title = substr($title, 0, $keys[$len]); | |
} | |
return $title; | |
} | |
add_filter('the_title', 'limit_word_count'); |
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
import React, { createContext, useState } from 'react'; | |
import initialValues from './initial'; | |
const Context = createContext(initialValues); | |
const GlobalContext = ({ children }) => { | |
const [globalState, setGlobalState] = useState(initialValues); | |
return ( | |
<Context.Provider value={{ globalState, setGlobalState }}> |
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
{ | |
"auto_format_on_save": true, | |
"auto_format_on_save_excludes": [ | |
"/node_modules/", | |
"*.json", | |
"*.md", | |
"*.html" | |
], | |
"prettier_options": { |
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
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security |
OlderNewer