A fork of andytuba RES settings backup script
Originally [andytuba]{https://gist.github.com/andytuba) created a script to convert Chrome RES backups and concert them to FireFox RES backups. I needed to go the other direction so I started this.
#!/usr/bin/env -S rust-script -c | |
//! ```cargo | |
//! [dependencies] | |
//! jiff = "0.1" | |
//! ``` | |
// | |
// Links for next releases: | |
// - https://releases.rs/ | |
// - https://github.com/rust-lang/rust/milestones | |
// - https://doc.rust-lang.org/edition-guide/rust-2024/index.html |
//! this script recreates the book | |
//! "It's not a sin: An Introduction to the Trigonometric Values of Standard Functions" | |
extern crate rand; // 0.8.4; | |
use rand::prelude::*; | |
const DEGREES_RANGE: std::ops::RangeInclusive<i16> = -2000..=2000; | |
const NUMBER_QUESTIONS: i16 = 20; // questions per function. 250 in the book | |
fn main() { | |
let mut rng = thread_rng(); | |
let functions: Vec<(&str, fn(f64) -> f64)> = | |
vec![("sin", f64::sin), ("cos", f64::cos), ("tan", f64::tan)]; |
# ---------------------------------------------------------------------------------- | |
# r u s t f m t - C O N F I G | |
# ================================================================================== | |
# | |
# Version: 0.7.1 | |
# Author : Robbepop <robbepop@web.de> | |
# | |
# A predefined .rustfmt.toml file with all configuration options and their | |
# associated description, possible values and default values for use in other | |
# projects. |
trait Field { | |
type ValueType; | |
} | |
use std::marker::PhantomData as Marker; | |
struct X<T>(Marker<T>); | |
struct Y<T>(Marker<T>); | |
struct Z<T>(Marker<T>); |
// import_json_appsscript.js | |
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4 | |
// | |
// Changelog: | |
// (Jul. 16 2018) tag: allenyllee-20180716 | |
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member." | |
// (Nov. 30 2017) tag: allenyllee-20171130 | |
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index | |
// 2. Fixed Issue: when the path and the rule partially matched but not under the same xpath, it will still print that value under that xpath. |
#!/usr/bin/env python | |
import asyncio | |
import websockets | |
import binascii | |
import ujson as json | |
method_map = { | |
'6d01': 'Set Name', | |
'6d02': 'Post Memo', |
A fork of andytuba RES settings backup script
Originally [andytuba]{https://gist.github.com/andytuba) created a script to convert Chrome RES backups and concert them to FireFox RES backups. I needed to go the other direction so I started this.
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; |
#!/usr/bin/env bash | |
# Generate a pseudo UUID | |
uuid() | |
{ | |
local N B C='89ab' | |
for (( N=0; N < 16; ++N )) | |
do | |
B=$(( $RANDOM%256 )) |
#!/usr/bin/env bash | |
# | |
# name : commitstrip-dl | |
# description : download all the commitstrip strips | |
# version : 1.0.0 | |
# author : José Luis Cruz © 2017 | |
# dependencies: bash<=4 curl [sxiv] | |
# license : MIT | |
# |