Skip to content

Instantly share code, notes, and snippets.

View definiteIymaybe's full-sized avatar

definiteIymaybe

View GitHub Profile
@definiteIymaybe
definiteIymaybe / admin.php
Created May 3, 2021 06:59 — forked from Dorf/admin.php
[Roots Sage starting admin functions] add Color Palette, Gutenberg editor styles, and basic Intervention commands #sage #roots #admin #intervention #gutenberg #editor
<?php
/**
* Admin assets
*/
add_action('admin_enqueue_scripts', function () {
// global $post;
// $my_post_type = 'page';
if ( stristr( $_SERVER['REQUEST_URI'], 'post.php' ) !== false // just for the post editor
// && is_object( $post )
@definiteIymaybe
definiteIymaybe / wordpress-plugin-svn-to-git.md
Created July 7, 2021 11:54 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@definiteIymaybe
definiteIymaybe / iterm2.md
Created July 12, 2021 11:19 — forked from nobitagit/iterm2.md
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
@definiteIymaybe
definiteIymaybe / directus_mover.sh
Created July 13, 2021 00:42 — forked from tspvivek/directus_mover.sh
Directus postgres DB - Script to move schema changes between different servers without replacing data
#!/bin/sh
start=`date +%s.%N`
SRC_CONNECTION_STRING="postgresql://src_username:src_password@src_host/src_dbname"
DST_CONNECTION_STRING="postgresql://dst_username:dst_password@dst_host/dst_dbname"
rm src_schema.sql
rm src_data.sql
rm dst_data.sql
@definiteIymaybe
definiteIymaybe / nuxt-js-and-gsheet-example.vue
Created July 26, 2021 16:25 — forked from mornir/nuxt-js-and-gsheet-example.vue
#sheets Nuxt.js vue component to display datas from a google spreadsheet (with google api V4 without oAuth )
<template>
<div id="homepage">
<h1>Les dernières Articles</h1>
<div class="article" v-for="article in articles">
<h2> {{ article.title }} </h2>
<p> {{ article.content }} </p>
</div>
</div>
</template>
@definiteIymaybe
definiteIymaybe / jq-cheetsheet.md
Created September 9, 2021 17:46 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@definiteIymaybe
definiteIymaybe / wget.sh
Created January 24, 2022 05:33 — forked from Dammmien/wget.sh
wget cheat sheet
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1
# But it may be sufficient
wget -mpk http://127.0.0.1
# Download all images of a website
@definiteIymaybe
definiteIymaybe / remove_tuxera.sh
Last active February 21, 2022 21:55 — forked from miguelmota/remove_tuxera.sh
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
launchctl unload /Library/LaunchAgents/com.tuxera.ntfs.agent.plist
sudo trash -Fv /Applications/Tuxera\ Disk\ Manager.app
sudo trash -Fv /Library/Application\ Support/Tuxera\ NTFS
sudo trash -Fv /Library/Filesystems/fusefs_txantfs.fs
sudo trash -Fv /Library/LaunchAgents/com.tuxera.ntfs.agent.plist
sudo trash -Fv /Library/PreferencePanes/Tuxera\ NTFS.prefPane
sudo trash -Fv /Library/Preferences/com.tuxera.NTFS.plist
@definiteIymaybe
definiteIymaybe / osxvpnrouting.markdown
Created March 29, 2022 10:57 — forked from taldanzig/osxvpnrouting.markdown
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN: