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
" vim: filetype=vifm : | |
" Sample configuration file for vifm on OSX (last updated: 2 April, 2023) | |
" You can edit this file by hand. | |
" The " character at the beginning of a line comments out the line. | |
" Blank lines are ignored. | |
" The basic format for each item is shown with an example. | |
" ------------------------------------------------------------------------------ | |
" Main settings | |
" ------------------------------------------------------------------------------ |
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
#!/bin/bash | |
# Ensure fswatch is installed | |
if ! command -v fswatch &>/dev/null; then | |
echo "Error: fswatch is not installed. Please install it before running this script." | |
exit 1 | |
fi | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <2 letter country code>" |
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 | |
add_action('wp_ajax_addTagToStory', 'add_tag_to_story'); | |
add_action('wp_ajax_nopriv_addTagToStory', 'add_tag_to_story'); | |
function add_tag_to_story() { | |
// Here you have everything passed from your JS function available as $_POST | |
// With $_POST['postID'], you can do almost any post manipulation you need | |
var_dump($_POST); | |
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 { connect, styled } from "frontity"; | |
import Link from "./link"; | |
const Post = ({ state }) => { | |
const data = state.source.get(state.router.link); // state.source.get('url-string') | |
const post = state.source[data.type][data.id]; // state.source[url-string -> type][url-string -> id] date.type is Post; data.id is Post ID | |
const author = state.source.author[post.author]; // state.source.author[post -> author] |
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 { connect, styled } from "frontity"; | |
console.log("Hello there"); | |
const Post = ({ state }) => { | |
const data = state.source.get(state.router.link); // state.source.get('url-string') | |
const post = state.source[data.type][data.id]; // state.source[url-string -> type][url-string -> id] date.type is Post; data.id is Post ID | |
const author = state.source.author[post.author]; // state.source.author[post -> author] |
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
/* append this to the bottom of the common.css file */ | |
/* via https://forum.vivaldi.net/topic/6289/tab-loading-indicator/24?page=2 */ | |
/* Applications/Vivaldi/Contents/Versions/1.1323.4343/vivaldi/style/common.css | |
@keyframes fade{ | |
from {opacity:1} | |
to {opacity:0.4} | |
} | |
/* Either pulse the "X"... */ | |
.button-toolbar.reload.loading svg{ | |
animation-name: fade; |
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
<script type="text/javascript"> | |
FusionCharts.ready(function(){ | |
var fusioncharts = new FusionCharts({ | |
type: 'column2d', | |
renderAt: 'global-food-safety-audit-rating', | |
width: '500', | |
height: '300', | |
dataFormat: 'json', | |
dataSource: <?= $chart_data ?> | |
} |
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 Guzzle | |
$client = new Client(); | |
$response = $client->get($this->api_url_path); | |
$this->api_data = $response->getBody()->getContents(); | |
var_dump($this->api_data); |
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 | |
require(dirname(__FILE__).'/../Extensions/PDF_FancyRow.php'); | |
?> |
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 | |
namespace IngredientManager; | |
/** | |
* Usage: In calling script: | |
* $enqueue_scripts = new EnqueueScript | |
*/ | |
class EnqueueScript | |
{ |
NewerOlder