Pure CSS Squircle has always been the fantasy of a web developer's good night's sleep.
It is possible to clip a div with a custom SVG, but you have to make that SVG, put it
on top of your HTML, then reference it inside the CSS, and regenerate it on each resize...
It is a nightmare and the performance is horrible. You can go mad and implement a CSS
Houdini to render squircle..., while
this is mind-blowingly awesome, it doesn't work in Safari, and still not Pure CSS (my
nightmare for those who disable JavaScript on their clients...). While there is work underway
to add the superellipse()
to CSS, the shape()
function is now supported on all major
This file contains hidden or 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 { addYears } from 'date-fns' | |
import { NextRequest, NextResponse } from 'next/server' | |
function middleware(req: NextRequest) { | |
if (req.nextUrl.pathname.startsWith('/api')) { | |
return NextResponse.next() | |
} | |
if (process.env.VERCEL_ENV !== 'preview') { | |
return NextResponse.next() |
This file contains hidden or 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
# | |
# This file contains VM parameters for Trader Workstation. | |
# Each parameter should be defined in a separate line and the | |
# last line must be followed by a line feed. No leading or | |
# trailing whitespaces are allowed in the same line, where a | |
# parameter is defined. | |
# | |
# Lines starting with a '#' character are treated as comments | |
# and ignored. Additionally, if a line contains a | |
# '### keep on update' string, all parameters defined below will |
This file contains hidden or 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
if (!Element.prototype.getInnerHTML) { | |
Element.prototype.getInnerHTML = function(opts) { | |
var html = this.innerHTML; | |
if (!opts || !opts.includeShadowRoots) return html; | |
var m = new (self.WeakMap || Map)(); | |
for (var c of (opts.closedRoots || [])) m.set(c.host, c); | |
var p = []; | |
function walk(node) { | |
var c, shadow = node.shadowRoot || m.get(node); | |
if (shadow) p.push(node.innerHTML, `<template shadowroot="${shadow.mode}">${shadow.innerHTML}</template>`); |
Sometimes a Python script will simply hang forever with no indication of what is going wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward.
Here's a way to see where the program is currently stuck, using pyrasite a tool for injecting code into running Python processes.
Install gdb.
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
This file contains hidden or 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
#! /bin/sh | |
kextoffdir="/kextoff" | |
loginhookscript="/Library/LoginHook/LoadDelayedAMDRadeonX3000kext.sh" | |
echo "--------------------------------------------------------------- | |
Run this script twice. | |
First, from a Recovery Mode commandline to run csrutil disable. | |
Second, after rebooting to a Single user mode commandline, with / partition mounted writeable, to do all the things that must be done with csrutil status= disabled |
This file contains hidden or 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
<?php | |
/** | |
* Converts a PNG image to a .GRF file for use with Zebra printers | |
* | |
* The input is preferably a 1-bit black/white image but RGB images | |
* are accepted as well. | |
* | |
* This function uses PHP's GD library image functions. | |
* |
Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
This file contains hidden or 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
/* | |
Unportify is a script that exports your Google Play music to text. | |
Copyright (C) 2016 Arnau Villoslada | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
NewerOlder