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 responsive_oembed_filter($markup, $url, $attr, $post_ID) { | |
return '<div class="video-container">' . $markup . '</div>'; | |
} | |
add_filter( 'embed_oembed_html', 'responsive_oembed_filter'); |
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
using System; | |
using System.IO; | |
public class Logger | |
{ | |
private string LogFilePath { get; set; } | |
private string FileExtension { get; set; } | |
private string FilePrefix { get; set; } | |
public Logger(string path, string filePrefix = "Log", string fileExtension = ".txt") |
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
<snippet> | |
<content><![CDATA[ | |
echo '<pre>'; var_dump(\$${1:variable_name_here}); echo '</pre>'; exit(); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>dd</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.php</scope> | |
</snippet> |
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
<html><head><title>Find String</title></head><body> | |
<?php | |
// ini_set('max_execution_time', '0'); | |
// ini_set('set_time_limit', '0'); | |
find_files('.'); | |
function find_files($seed) { | |
if(! is_dir($seed)) return false; | |
$files = array(); | |
$dirs = array($seed); | |
while(NULL !== ($dir = array_pop($dirs))) |
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
<snippet> | |
<content><![CDATA[ | |
import React, { Component } from "react"; | |
import { | |
View, | |
Text, | |
TouchableWithoutFeedback, | |
Image, | |
Animated | |
} from "react-native"; |
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
<snippet> | |
<content><![CDATA[ | |
this.${1:func} = this.${1:func}.bind(this); | |
]]></content> | |
<description>Bind class methods in constructor for React components.</description> | |
<tabTrigger>bind</tabTrigger> | |
<scope>source.js</scope> | |
</snippet> |
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 | |
Illuminate\Support\Collection::macro('keyByRecursive', function ($func) { | |
return $this->keyBy(function ($value, $key) use ($func) { | |
return $func($value, $key); | |
})->map(function ($item) use ($func) { | |
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
# Note: Both these requests are being fired by the cloudinary medialibrary js code, not my code. | |
# Works! This is 'copy as curl' from Chrome, where I don't get the 401 error. | |
curl 'https://cloudinary.com/console/api/v1/auth/login_from_session' \ | |
-H 'pragma: no-cache' | |
-H 'cookie: _ga=GA1.2.813819547.1538000561; __utma=136482402.813819547.1538000561.1557868798.1557868798.1; __utmz=136482402.1557868798.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _mkto_trk=id:396-LRB-524&token:_mch-cloudinary.com-1557868798202-41547; intercom-session-f8c4avgs=eU9ZUWlHa3M4SGRKdmMrTjZKU2cvM2FwNkc2blRiaFVoNnFqOHp6OGxVWFBtREo3cFZxOWdCNnNQVnM3cjR2Ry0td2FtY083YVlQY1F1dXQvNXAzRERNQT09--23ea95a8522a7e2e61e0f2a9d427399076fffd0b; new_ml_enabled=yes; _cld_session_key=9a4aad31e7fdfb49e8c2d84aa0058260; _gid=GA1.2.1358471984.1558366586; _gat_UA-25966579-7=1; AWSALB=KOnDJDzN5FvI0QMXbBowU1lYTxi1xdSr8cQEJIDYz2uVPho7FamV++d8iSWr6moSaze+QFXg9Q3s+zK6VB+gL7CIXsU9TGaPImTHfZh9NWD06pHOG4dWJX9hhTl4' | |
-H 'accept-encoding: gzip, deflate, br' \ |
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
// Fonts | |
@import url("https://fonts.googleapis.com/css?family=Nunito"); | |
// Variables | |
@import "variables"; | |
@import "keyframes"; | |
@import "animations"; | |
// Bootstrap | |
@import "~bootstrap/scss/bootstrap"; |
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 { createNamespacedHelpers } from "vuex"; | |
import Axios from "axios"; | |
import { getHelperWords, getWordObj } from "../functions/helperWords"; | |
import builderUtils from "../functions/builderUtils"; | |
import randomString from "../functions/randomString"; | |
export default { | |
...createNamespacedHelpers("builder"), | |
namespaced: true, |
OlderNewer