-
Locate the path to the interpreter for the language you are writing in with the
which
command.which node which python which bash which ruby
-
Add that path as an interpreter directive (using
#!
) on the first line of your script. For example if you want to write a node script andwhich node
returned/usr/local/bin/node
, the first line of your script should be:
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
<html> | |
<head><title>Canvas Delaunay Triangulation</title></head> | |
<body></body> | |
<script type="text/javascript"> | |
var img = new Image(); | |
img.onload = init; | |
img.src = './bg_10.jpg'; | |
var display, source; | |
var points = [], drew = []; |
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
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
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
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
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
<html> | |
<head> | |
<script src="https://cdn.shopify.com/s/assets/external/pos_app.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
ShopifyPOS.init({ | |
apiKey: "0dc181105f1912f21b5de1a0ae64db37", | |
shopOrigin: "https://CURRENT_LOGGED_IN_SHOP.myshopify.com" | |
}); |
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
/** | |
* Convert a hex string to an ArrayBuffer. | |
* | |
* @param {string} hexString - hex representation of bytes | |
* @return {ArrayBuffer} - The bytes in an ArrayBuffer. | |
*/ | |
function hexStringToArrayBuffer(hexString) { | |
// remove the leading 0x | |
hexString = hexString.replace(/^0x/, ''); | |
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
type Primitive = | null | undefined | string | number | boolean | symbol | bigint; | |
type LiteralUnion<LiteralType, BaseType extends Primitive,> = LiteralType | (BaseType & Record<never, never>); | |
export interface Shopify { | |
PaymentButton: { | |
init(): any | |
} | |
autoloadFeatures(param: any): any | |
/** | |
* Only show in Theme previews, it's a class instance, yuck. |
OlderNewer