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
# GitHub Action that will run prettier on the whole repo and commit the changes to the PR. | |
name: Prettier | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest |
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
[ | |
{ | |
"category": "News", | |
"multiplier": "0.97", | |
"region": "South America" | |
}, | |
{ | |
"category": "Sports", | |
"multiplier": "1.74", | |
"region": "South America" |
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
if [ -z $OAUTH_TOKEN ] | |
then | |
if [ -z $CLIENT_ID ] | |
then | |
APP_INFO=$(curl -s -X POST \ | |
-F 'client_name=Example App' \ | |
-F 'redirect_uris=urn:ietf:wg:oauth:2.0:oob' \ | |
-F 'scopes=read' \ | |
-F 'website=https://example.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
// Define the default fill and stroke colors | |
const defaultFill = "#dcfce7"; | |
const defaultStroke = "#bbf7d0"; | |
// Define the stroke width | |
const strokeWidth = 4; | |
/** | |
* Draws a sparkline SVG based on the given width, height and points | |
* @param {number} width - The width of the SVG element |
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 template = { | |
input: [ | |
{ | |
role: "system", | |
content: | |
"You are a skilled mathematician capable of solving math equations. Walk through the answer. Solve the equations with only the numerical answer rounded to 4 decimal places. Include the answer in square brackets []. Do not include comma in the answer." | |
}, | |
{ | |
role: "user", | |
content: "<TO_BE_FILLED>" |
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
// ==UserScript== | |
// @name Bing Tamper | |
// @namespace Violentmonkey Scripts | |
// @match https://www.bing.com/search | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 3/17/2023, 11:59:35 AM | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name BJ's Coupon Clipper | |
// @namespace Violentmonkey Scripts | |
// @match https://www.bjs.com/ | |
// @grant none | |
// @version 1.0 | |
// @author @raxityo | |
// @description 3/24/2024, 11:01:30 PM | |
// ==/UserScript== |
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
/** | |
* ©️ Copyright 2022 Raxit Majithiya https://github.com/raxityo | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT O |
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
/** | |
* Execute a callback on the main scope after given delay. | |
* | |
* @param timeMillis delay in milliseconds | |
* @param callback callback to execute after the delay | |
*/ | |
fun View.lifecycleAwarePostDelayed(timeMillis: Long, callback: () -> Unit) { | |
findViewTreeLifecycleOwner()?.lifecycle?.coroutineScope?.launch(Dispatchers.Main) { | |
delay(timeMillis) | |
callback() |
NewerOlder