Skip to content

Instantly share code, notes, and snippets.

View travisfont's full-sized avatar
🍇
// = Earthberries !!

Travis van der F. travisfont

🍇
// = Earthberries !!
View GitHub Profile
@travisfont
travisfont / update-golang.md
Created January 28, 2025 17:23 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@travisfont
travisfont / README.md
Last active May 28, 2024 17:42 — forked from liitfr/README.md
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f -print0 | xargs -0 chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false
@travisfont
travisfont / .jshintrc.js
Last active June 17, 2019 12:00 — forked from connor/.jshintrc.js
jshintrc example [updated]
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
"esversion" : 6, // allowing ES6
// Predefined globals whom JSHint will ignore.
@travisfont
travisfont / excerpt.php
Created June 11, 2018 11:46 — forked from wpscholar/excerpt.php
Generate an excerpt from provided content. Strips HTML, removes trailing punctuation and adds a 'more' string when text has been removed.
<?php
/**
* Get an excerpt
*
* @param string $content The content to be transformed
* @param int $length The number of words
* @param string $more The text to be displayed at the end, if shortened
* @return string
*/
@travisfont
travisfont / wp-get_id_by_slug
Last active June 11, 2018 10:26 — forked from lcdsantos/wp-get_id_by_slug
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Pierre subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="all" title="all">
<outline type="rss" text="ScaleScale.com" title="ScaleScale.com" xmlUrl="http://www.scalescale.com/feed/" htmlUrl="http://www.scalescale.com"/>
<outline type="rss" text="InfoQ" title="InfoQ" xmlUrl="https://www.infoq.com/fr/feed?token=SLR1jAj2muGO5L2U2sIUYaQgzGPlyuFP" htmlUrl="http://www.infoq.com"/>
@travisfont
travisfont / donut_chart.js
Last active August 29, 2015 14:09 — forked from jac1013/donut_chart.js
A d3.js single value donut chart. JSFiddle: http://jsfiddle.net/8moez4j3/
var donutChart;
(function() {
var w = 500,
h = 300,
r = 100,
innerRadius = 80,
transitionsDuration = 1000,
transitionsDelay = 250,
percentageTextSize = '2.0rem';