Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:math';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@grifx
grifx / 0000_hello_world.md
Last active March 19, 2024 10:39
Create your own roadmaps from roadmap.sh with checkboxes on GIST

Hello,

My SO is learning coding. I wanted a convenient way for her to consume the content from roadmap.sh.

I hope it can help someone else.

If you want your own roadmap:

  1. Fork or Copy-paste the md files you are interested in your own gist.
@bagerathan
bagerathan / woo-events.js
Last active March 19, 2024 10:38
[Woocommerce Javascript events] #woo
//Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
//Woocommerce cart page JS events
$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
@ih2502mk
ih2502mk / list.md
Last active March 19, 2024 10:37
Quantopian Lectures Saved
@Kixunil
Kixunil / anyonecanboost.md
Last active March 19, 2024 10:36
Anyone can boost

Anyone can boost - a more efficient alternative to anchor outputs

Abstract

Bitcoin protocols using presigned transactions (e.g. Lightning Network, Firefish etc) face a problem with predicting fees of the presigned transactions. One possibility is to guess the future fee rate but that risks that the transaction will not be included in a block fast enough and it also risks wasting satoshis on fees. Another possibility is to use CPFP which may require adding more outputs - so called "anchor outputs". The drawbacks of anchor outputs are increased transaction size and potentially decreased privacy since the anchor outputs usually use "suspiciously low" amounts. Further, anchor outputs may pollute UTXO set if the presigned transaction confirms anyway (because it also had high enough fee) but the outputs are uneconomical to spend. This document proposes a new solution that could not only solve these issues but bring even more efficiency gains in the future.

@pajaydev
pajaydev / js-objects-compare.md
Last active March 19, 2024 10:35
JS Objects : Object.keys vs for..in vs getOwnPropertyNames vs Object.entries

Object.keys vs for..in vs getOwnPropertyNames vs Object.entries

const language = {
  name: 'JavaScript',
  author: 'Brendan Eich'
};

// Inheriting from another object.
Object.setPrototypeOf(language, {createdAt: "Netscape"});
{
"input": {
"blocklist": [],
"compressor#0": {
"attack": 5.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"bypass": false,
"dry": -100.0,
"hpf-frequency": 10.0,
@nico-i
nico-i / drink_water_cron.sh
Last active March 19, 2024 10:32
Display an intrusive prompt to drink water every 15min using a cron job
# - OSX / MacOS -
# Cron Job
*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog "Drink some water. :]" buttons {"OK"}'
# Automatically add cron job to existing cron jobs
(crontab -l ; echo "*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog \"Drink some water. :]\" buttons {\"OK\"}'") | crontab -
# as su
(sudo crontab -l ; echo "*/15 * * * * osascript -e 'tell application (path to frontmost application as text) to display dialog \"Drink some water. :]\" buttons {\"OK\"}'") | sudo crontab -
# - Fedora Linux -
# Cron Job
@sts10
sts10 / rust-command-line-utilities.markdown
Last active March 19, 2024 10:31
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@dzitkowskik
dzitkowskik / SeleniumGridTutorial.md
Last active March 19, 2024 10:29
A simple tutorial of using selenium grid in python unittests

Prepare files & libraries

  1. Download selenium standalone server from: http://goo.gl/rQhaxb, Create local folder at ~/selenium and copy or move jar to that path:
$ mkdir ~/selenium
$ cd ~/selenium
$ wget http://goo.gl/rQhaxb
$ mv selenium-server-standalone-2.49.1.jar ~/selenium/