Add it to the body
<body hx-ext="hx-astro-view-transition">
An example
<?php | |
date_default_timezone_set('America/Los_Angeles'); | |
session_start(); | |
include("ratelimiter.php"); | |
// in this sample, we are using the originating IP, but you can modify to use API keys, or tokens or what-have-you. | |
$rateLimiter = new RateLimiter($_SERVER["REMOTE_ADDR"]); | |
$limit = 100; // number of connections to limit user to per $minutes | |
$minutes = 1; // number of $minutes to check for. |
<?php | |
define('UCHAR_MAX',255); | |
function boyermoore_horspool_memmem($haystack,$needle){ | |
$hlen = strlen($haystack); | |
$nlen = strlen($needle); | |
$scan = 0; | |
$bad_char_skip[UCHAR_MAX + 1]; | |
if ($nlen <= 0 || !$haystack || !$needle) { return NULL; } | |
for ($scan = 0; $scan <= UCHAR_MAX; $scan = $scan + 1) | |
$bad_char_skip[$scan] = $nlen; |
Add it to the body
<body hx-ext="hx-astro-view-transition">
An example
I hereby claim:
To claim this, I am signing this object:
import console | |
console.show_activity() | |
import urllib | |
from urllib import urlencode | |
import bs4 | |
import requests | |
import webbrowser | |
import sys | |
import sound | |
sound.load_effect('Powerup_2') |
#!/bin/bash | |
echo "installing gcc" | |
sudo rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern | |
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo | |
yum install -y devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2 devtoolset-2-binutils devtoolset-2-libstdc++-devel-4.8.2 | |
sleep 2 | |
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/ | |
hash -r | |
gcc --version |
/* | |
Copy this to scriptable | |
When creating a widget, add the hours you start fasts and eating time (ie 19:00,8:00) | |
Also set fastingInterval to the number of hours your eating time has. | |
*/ | |
const canvSize = 282; | |
const canvTextSize = 40; | |
const canvas = new DrawContext(); | |
canvas.opaque = false |
#! /usr/bin/env bash | |
if [ -z "$1" ]; then | |
echo USAGE: "$0" EXAMPLE | |
exit | |
fi | |
url="https://github.com/directus/examples/$1" | |
# default to branch master | |
branch=main |
<?php | |
define('ALPHABET_SIZE',1); | |
function compute_prefix($str,$size,&$result=0) | |
{ | |
$result = $result[$size + 1]; | |
$q; | |
$k; | |
$result[0] = 0; |
<?php | |
/** | |
* Retrieves the thumbnail URL to use for a post | |
* @param string $text The body of the post (get_content) | |
* @param string $size The image size to retrieve | |
* @return string The image URL to use | |
*/ | |
function get_thumb_url($text, $size){ | |
global $post; | |
$imageurl = FALSE; |