Skip to content

Instantly share code, notes, and snippets.

import React, { useRef, ChangeEvent, useCallback } from 'react';
import classNames from 'classnames';
export enum Plans {
free = 'free',
standard = 'standard',
pro = 'pro',
}
interface PlanInputRadioProps {
@marcospgp
marcospgp / ideas-for-startups-dropdown-reading.md
Last active August 19, 2022 01:58
Experimenting with a new way of reading long form text with Paul Graham's Ideas For Startups

Ideas For Startups

Written by Paul Graham and copied from http://www.paulgraham.com/ideas.html

October 2005

(This essay is derived from a talk at the 2005 Startup School.)

People think it's hard to come up with good ideas for startups because they don't actually try to do it.
#Reference
#Jones(1999) "Reduced state-variable tomato growth model"
#Jones(1991) "A dynamix tomato growth and yield model(TOMGRO)"
#Dimokas(2009) "Calibration and validation of a biological model..."
#Heuvelink(1994) "Dry-matter partitioning in a tomato crop:Comparison of two simulation models"
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import random
@jwdb
jwdb / Program.cs
Last active March 27, 2019 07:56
TGBot in one line because @baaakaaaaaaaaa didn't believe me
using System.IO;using Telegram.Bot.Helper;using Telegram.Bot;using Telegram.Bot.Types.Enums;using Telegram.Bot.Types.ReplyMarkups;namespace TGBotLiner{class Program{static void Main(string[] args){TelegramBotHelper _h;_h=new TelegramBotHelper(()=>new TelegramBotClient(File.ReadAllText("token.txt")));_h.Client.OnUpdate+=async(o,e)=>{await _h.UpdateReceived(e.Update);};_h.Messages(_m=>{_m["/start"]=async(m,_)=>{await _h.Client.SendTextMessageAsync(m.Chat.Id,"Hello in my test bot!",replyMarkup:new ReplyKeyboardMarkup(new KeyboardButton("About")));};_m["About"]=async(m,_)=>{await _h.Client.SendTextMessageAsync(m.Chat.Id,"This bot was created by Psyonity.");};});_h.Client.StartReceiving(allowedUpdates:new[]{UpdateType.Message,UpdateType.CallbackQuery});}}}
@mrothNET
mrothNET / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Last active October 27, 2023 00:36
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
@emjayoh
emjayoh / dell-xps-archlinux-install
Created January 26, 2018 08:21
Install ArchLinux on Dell XPS 13 (9360)
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
import requests
import csv
import datetime
import calendar
import time
i=0
# Change the range depending on how long you like to record the data
for i in range (0,50):
@ryhanson
ryhanson / ExcelXLL.md
Last active July 22, 2024 15:25
Execute a DLL via .xll files and the Excel.Application object's RegisterXLL() method

DLL Execution via Excel.Application RegisterXLL() method

A DLL can be loaded and executed via Excel by initializing the Excel.Application COM object and passing a DLL to the RegisterXLL method. The DLL path does not need to be local, it can also be a UNC path that points to a remote WebDAV server.

When delivering via WebDAV, it should be noted that the DLL is still written to disk but the dropped file is not the one loaded in to the process. This is the case for any file downloaded via WebDAV, and they are stored at: C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\.

The RegisterXLL function expects an XLL add-in which is essentially a specially crafted DLL with specific exports. More info on XLL's can be found on MSDN

The XLL can also be executed by double-clicking the .xll file, however there is a security warning. @rxwx has more notes on this here inc

@eightyknots
eightyknots / avregex.md
Last active July 7, 2024 20:19
AvReg: Aviation regex match toolkit

AvReg: The Aviation RegEx Match Toolkit

General Tips

  • The PCRE flavour of RegEx is used here.
  • Append the i modifier to the end of the regex to make any pattern case-insensitive.

Aircraft

| Purpose | Description | RegEx | Example |

@huqi
huqi / trial.key
Created April 11, 2015 09:01
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t