<a href="https://app.onlydust.xyz/projects/6196eca8-5467-4587-b9f7-8ebebab0f841">
<img src="https://img.shields.io/badge/An%20OnlyDust%20project-%23000?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAAAXNSR0IArs4c6QAABNNJREFUOE9tlGtQ1FUchp/z/+8usLCArOAuICyggwpI4mVEQzNJVMQZb6WpqTikXSxDDC2bMUv9YAw2loWUOo06lo02XsoUL2NqogmmgmCgcleQ24Jclt09zeLo2OV8O7/3Pc+cOXPeV/A/S57B96Zm/Gu7m1MLsqYvOv+sZVNeXvwrg/rGhgcF7hEioP3fx8WzA7keDRGk1hst2cOiDl+rDR061qWf8S/y8lOMMvaB6ZFrv25SbWHGHhHm4+++Anz3CiGcTzhPgTJluJ6Yqzk9g3ULdmw+S3P38Bkflbv9JFv29nFszjyIqkg185fZwieqKZKSlcuSPLLfO2YEteNLaF0lxMBuF7QXKJGKLe7Vb3RT9y+5rsaT+vE+3BEJUTkN+VWJynf1FbY5slFHDH77FxeFLg7OPrvYy6Ms1//sBNTIfkB9NoSvEkLIXmABDfMiLNn7vBdtpuC3XBpPzyPY/c5XQ7pi3nTpppyu5G67Q2l+y/NI7wU+VU+idSQ6x29EjMxAKJXguJ8iNAlHxRykOg9b9XjjLpPfrDU0HNuEX+xO1OjCDtJGmMXAfOs/3lleNvHwSCXSqXV2GVCCl4NoAsftMtRLkWIy1hlz0B+covsZU8o6RNx18AfiIiAmy4Fu2twDB9RDHICJi1ihH0KW1mxXhEbB3gw6/xbACvZb0JyXLOKo+3Yp/VInKwUExXyO27pDMCwJwtfj7Img9bQHTefbnT11IOu9
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
// Dynamic allocation in Cairo is done using the `alloc` function, | |
// which itself is implemented in Cairo using the | |
// [segments](https://www.cairo-lang.org/docs/how_cairo_works/segments.html) mechanism. | |
// Thanks to this mechanism, `alloc` allocates an array of an arbitrary size, | |
// which does not need to be specified in the call. | |
// | |
// The function `sqr_array` should compute and return an array | |
// of the square values of a given array. | |
// Write the body of `sqr_array` using the given helper function | |
// `_inner_sqr_array` and check that the program output |
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
function asciiToFelt(str) { | |
if ( ! isNaN( str ) ) return '' + str; | |
var arr1 = []; | |
for (var n = 0, l = str.length; n < l; n++) { | |
const hex = Number(str.charCodeAt(n)).toString(16); | |
arr1.push(hex); | |
} | |
let hex = arr1.join(""); | |
if ( hex %2 ) hex = '0' + hex; | |
return BigInt('0x' + hex).toString(); |
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 | |
/** | |
* Get google reviews | |
* @return array Google reviews data | |
*/ | |
function get_google_reviews(){ | |
// URL to fetch | |
$google_api = 'https://maps.googleapis.com/maps/api/place/details/json?placeid=<your_place_id>&sensor=true&key=<key>'; |
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
// region Setup database client | |
const { MongoClient } = require( 'mongodb' ); | |
// Server to connect to | |
const uri = "mongodb://localhost:27017"; | |
const dbServer = new MongoClient( uri ); | |
// endregion Setup database client |
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
async function addDataToDB() { | |
try { | |
// Destructive operation do only when needed | |
// await sequelize.sync( {force: true} ); | |
await Vehicle.create( { | |
type: 'car', | |
carPlateNo: 'SA882' | |
} ); |
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
/* Distracting top tabs */ | |
a[aria-label="Watch"], a[aria-label="Marketplace"], a[aria-label="Groups"], a[aria-label="Gaming"] { | |
/* Make invisible */ | |
opacity: 0; | |
} | |
/* Distracting top tabs on hover (mouseover) */ | |
a[aria-label="Watch"]:hover, a[aria-label="Marketplace"]:hover, a[aria-label="Groups"]:hover, a[aria-label="Gaming"]:hover { | |
/* Slightly visible on hover */ | |
opacity: .5; |
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
$tpl = <<<JS | |
// region BlkTitle | |
CaxtonBlock( { | |
id: 'woobuilder-blocks/BlkID', | |
title: 'BlkTitle', | |
icon: 'layout', | |
category: 'woobuilder', |
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
/** | |
* Class to handle batch set to docs maximum 500 per commit | |
*/ | |
class BatchSetHandler { | |
/** | |
* Construct BatchSetHandler object | |
* @param {firebase.firestore.WriteBatch} dbBatch | |
* @param {function} commitCallback Callback after commit promise is resolved. | |
*/ |
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 | |
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
/** | |
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE. | |
* IE10 and up does not support conditional comments in standards mode. | |
* | |
* @uses wp_style_add_data() WordPress function to add the conditional data. | |
* @link https://developer.wordpress.org/reference/functions/wp_style_add_data/ |
NewerOlder