Skip to content

Instantly share code, notes, and snippets.

View shroomist's full-sized avatar
🍄

Andrej Novikov shroomist

🍄
View GitHub Profile
@Gavinok
Gavinok / chatgpt.el
Last active September 12, 2024 23:26
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,

Logic composability problems of lifecycle hooks in React

Suppose I have these components in my project:

class MessageHeader extends React.Component { /* ... */ }

class NiceButton extends React.Component { /* ... */ }

class FridgeContents extends React.Component { /* ... */ }
@miblodelcarpio
miblodelcarpio / notes_weechat
Last active August 25, 2024 02:53
WeeChat Relay Setup
weechat
Relay setup
On the server's instance of weechat:
/relay add ssl.irc 8001
/secure set relay WHATEVER_PASSWORD
/set relay.network.password "${sec.data.relay}"
On the server, to generate the ssl certificate:
@fabdarice
fabdarice / Contract Verification & Publication
Last active August 23, 2022 10:30
Useful Solidity/Web3/Truffle commands
1) go to https://ropsten.etherscan.io/verifyContract?a=0xa32b21ba14fd476757e392db5d1bbc833eaedaf5
2) enter contract address, name, compiler
3) copy code of contract flatten out (delete import and replace by actual code)
4) truffle console
5) var Eth = require('ethjs')
6) Eth.abi.encodeParams(["uint256", "uint256", "uint256", "address", "uint256"], ["1508105298", "1508710098", "200", "0x3d208fabaf7e919985d5d2f068f28d6a9022e8d5", "5000000000000000000000000000"])
7) copy paste result of encodeParams without '0x'
@iani
iani / loopiera1_150505.scd
Created May 5, 2015 09:33
loopiera1 150505: First steps in playing with live input playback in SuperCOllider
//========== 0. SETUP ============
// Must boot first to get sample rate!
Server.default.boot;
// After the server has booted, we can set up:
(
~recduration = 4;
@staltz
staltz / introrx.md
Last active September 20, 2024 10:10
The introduction to Reactive Programming you've been missing