Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Enrique Chavez Tmeister

🏠
Working from home
View GitHub Profile
View generate.php
<?php
namespace App\Jobs;
use App\Lead;
use Cache;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
@Tmeister
Tmeister / app.js
Created Oct 30, 2019
Add CSRF to axios
View app.js
/**
* Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually.
*/
const token = document.head.querySelector( 'meta[name="csrf-token"]' );
if ( token ) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
View LineChart.vue
<script>
import { Line, mixins } from 'vue-chartjs';
const { reactiveProp } = mixins;
export default {
extends: Line,
mixins: [reactiveProp],
props: {
chartdata: Object,
View wp-config.php
<?php
define('SP_REQUEST_URL', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', SP_REQUEST_URL);
define('WP_HOME', SP_REQUEST_URL);
View wp-settings.json
{
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"phpcs.standard": "WordPress",
"phpfmt.passes": [
"DoubleToSingleQuote",
"SpaceAroundParentheses"
],
"phpfmt.psr2": false,
"phpfmt.indent_with_space": false
View queries.css
/*
* Device = Laptops, Desktops
*/
@media (min-width: 1025px){
body{
font-size: 18px;
}
}
/*
View acf.php
<?php
/**
* Get the header BG color
*
* @return string
*/
public function blogColor()
{
$term = get_queried_object();
View tree.js
tree: {
name: 'Topics',
children: [
{
name: 'Business',
children: [
{
name: 'Company',
children: [
{ name: 'Date Company Was Founded', size: 10 },
View vscode-normal-settings.json
{
"workbench.iconTheme": "eq-material-theme-icons-darker",
"editor.fontFamily": "'Fira Code', Operator Mono, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.letterSpacing": 0.5,
"files.trimTrailingWhitespace": true,
"editor.fontWeight": "500",
"editor.cursorStyle": "line",
"editor.cursorWidth": 5,
"editor.renderWhitespace": "none",
You can’t perform that action at this time.