Skip to content

Instantly share code, notes, and snippets.

View rodrigobertin's full-sized avatar

RNB Developer rodrigobertin

View GitHub Profile
@abegehr
abegehr / AppRouter.svelte
Last active May 16, 2025 18:01
Simple AppRouter with nested and guarded route definitions for Svelte SPA with browser history support in <200 lines backed by nanostores.
<script module>
/*
Sample usage:
```svelte
<script lang="ts>
import AppRouter, { type Router } from "./AppRouter.svelte";
import Login from "./pages/Login.svelte";
import Home from "./pages/Home.svelte";
import Messages from "./pages/Messages.svelte";
@atomtigerzoo
atomtigerzoo / wordpress-hide-editor-on-pages.php
Last active December 29, 2020 17:25 — forked from ramseyp/hide-editor.php
Wordpress: Hide the editor on defined pages
/**
* Hide the main editor on specific pages
*/
define('EDITOR_HIDE_PAGE_TITLES', json_encode(array()));
define('EDITOR_HIDE_PAGE_TEMPLATES', json_encode(array('template-cars.php')));
/**
* Hide the main editor on defined pages
*
@ihorvorotnov
ihorvorotnov / get-social-shares
Last active May 26, 2024 08:13
Get number of shares from social platforms
Facebook*:
https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
+ works, returns shares, likes, comments and total
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=%%URL%%&callback=twttr.receiveCount
+ v1 API but still works
Reddit:
http://buttons.reddit.com/button_info.json?url=%%URL%%