Skip to content

Instantly share code, notes, and snippets.

@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active April 23, 2024 16:53
Install frp as systemd service
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
# 1. Thanks to GitHub user @aka-Ani, this script now will install latest version of frp:
# https://gist.github.com/lawrenceching/41244a182307940cc15b45e3c4997346?permalink_comment_id=4851742#gistcomment-4851742
# 2. Use .toml conf file as .ini became lagacy
#
# Update on 2023/06/19
# 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself
@tomdaley92
tomdaley92 / README.md
Last active April 23, 2024 16:52
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@ekreutz
ekreutz / ansible_variable_precedence.md
Last active April 23, 2024 16:52
Ansible variable precedence (order, hierarchy)
@sambacha
sambacha / find_optimizer_runs.sh
Last active April 23, 2024 16:52
Find Optimizer Runs for Solidity Compiler
#!/usr/bin/env bash
set -e
# Constants, run forge build --sizes first to see existing build size
# TODO Have a MAX_SIZE value for current build configuration?
TARGET_SIZE=6.250
MIN_RUNS=200
# Explanation of MAX_RUNS: Etherscan does not support verifying contracts with more than 10,000,000 optimizer runs.
# Using a higher number might not affect the bytecode output, but verification might require "spoofing" the optimizer run count.
@portal7
portal7 / MonthToString.cs
Created October 20, 2016 15:36
Month to String with Culture Spanish / Mes a partir de una Fecha en C# con cultura EspaΓ±ol
public string MonthName(int month)
{
DateTimeFormatInfo dtinfo = new CultureInfo("es-ES", false).DateTimeFormat;
return dtinfo.GetMonthName(month);
}
// Use
DataTime fecha = Convert.ToDateTime("16/04/2010");
@code-boxx
code-boxx / 0-PHP-APPOINTMENT.MD
Last active April 23, 2024 16:50
PHP MYSQL Appointment Booking

PHP MYSQL APPOINTMENT BOOKING SYSTEM

https://code-boxx.com/appointment-booking-php-mysql/

NOTES

  1. Create a database and import 1-database.sql.
  2. Change the database, "slots", and date settings in 2-lib-appo.php.
  3. Access 3a-select.php in the browser.

LICENSE

Copyright by Code Boxx

@adibhanna
adibhanna / keymap.json
Created April 18, 2024 17:55
zed keymaps
[
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"ctrl-w z": "workspace::ToggleZoom",
"ctrl-w t": "terminal_panel::ToggleFocus",
"g ]": "editor::GoToDiagnostic",
"g [": "editor::GoToPrevDiagnostic",
"g r": "editor::FindAllReferences",
"shift-k": "editor::Hover",
import Foundation
extension MainActor {
/// Invoke `body`, running synchronously if possible.
///
/// This method is equivalent to `Task { @MainActor in <body> }`, except that
/// the first thread hop is elided if the caller is already on the main thread.
/// Thus if `<foo>` has no subsequent thread hops, it can run fully synchronously.
@discardableResult
public static func runAsap<Success>(
@rxaviers
rxaviers / gist:7360908
Last active April 23, 2024 16:46
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:

1. Clone the repo

git clone https://github.com/Sindri-Labs/sindri-resources.git
cd sindri-resources/circuit_database/circom/multiplier2

2. Change your circuit name

sindri.json