CREATE OR REPLACE FUNCTION public.sp_user_ins_status(status smallint)
RETURNS integer
LANGUAGE plpgsql
AS $function$
To embed the contents of an SVG file into your site using NextJS 12 with the new Rust-based compiler, perform the following steps:
- Install
@svg/webpack
:
$ npm install --save-dev @svgr/webpack
- Create a
svgr.config.js
config file with the following contents. This will remove the width and height from the SVG but keep the viewBox for correct scaling.
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 PropTypes from 'prop-types'; | |
import { useState, useEffect, useContext, createContext } from 'react'; | |
import { useRouter } from 'next/router'; | |
import merge from 'deepmerge'; | |
import usePrevious from 'hooks/usePrevious'; | |
const useProvideSegment = () => { | |
const [location, setLocation] = useState(); | |
const router = useRouter(); |
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
var cookieVal = document.cookie, | |
testVal = "mixpanel", | |
localStorageKey = "mixpanel-cookie", | |
canWriteCookie = false; | |
// Test cookie | |
document.cookie = testVal; | |
canWriteCookies = document.cookie === testVal; | |
// Restore cookie |
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
const Sitemapper = require('sitemapper'); | |
(async () => { | |
const mapper = new Sitemapper(); | |
const sitemap = await mapper.fetch(`https://www.example.com/sitemap.xml`); | |
console.log(sitemap); | |
})(); |
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
/* Mime Types Support */ | |
add_filter('upload_mimes', 'custom_mime_types', 999999); | |
function custom_mime_types($mimes) { | |
$mimes['otf'] = 'application/x-font-opentype'; | |
$mimes['woff'] = 'application/font-woff'; | |
$mimes['woff2'] = 'application/font-woff2'; | |
return $mimes; | |
} | |
/* Custom Font Types Support */ |
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
sub vcl_recv { | |
if (req.http.host == "domain.com" && req.url.path == "/user") { | |
error 601 "user"; | |
} | |
} | |
sub vcl_error { | |
if (obj.status == 601) { | |
set obj.http.Content-Type = "text/json"; | |
set obj.status = 200; |
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
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -reqexts SAN -extensions SAN \ | |
-config <(cat /System/Library/OpenSSL/openssl.cnf \ | |
<(printf '[SAN]\nsubjectAltName=DNS:*.local')) |
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
npm list -g --depth=0 |
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="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Organization", | |
"@id": "#organization", | |
"name": "Outlyer", | |
"url": "https://www.outlyer.com/", | |
"sameAs": [ | |
"https://github.com/outlyerapp", | |
"https://twitter.com/outlyer", |
NewerOlder