Skip to content

Instantly share code, notes, and snippets.

@vishalxl
vishalxl / GetNostrEvents.dart
Last active February 18, 2023 04:34
Get Nostr Events from a Relay
import 'dart:io';
import 'dart:convert';
String serverUrl = 'wss://nostr-pub.wellorder.net';
var userPublickey = "3235036bd0957dfb27ccda02d452d7c763be40c91a1ac082ba6983b25238388c";
var userSubReq = '["REQ","latest",{ "authors": ["$userPublickey"], "limit": 5 } ]';
class EventData {
String id;
String pubkey;
@gwmccubbin
gwmccubbin / DappToken.sol
Created March 4, 2020 16:31
DApp ERC-20 Token
pragma solidity ^0.5.0;
contract Token {
string public name = "DApp Token";
string public symbol = "DAPP";
uint256 public totalSupply = 1000000000000000000000000; // 1 million tokens
uint8 public decimals = 18;
event Transfer(
address indexed _from,
@ewpratten
ewpratten / bfcc.sh
Created January 21, 2020 03:58
My bash BrainFuck compiler
#! /bin/bash
# Evan Pratten's Bash BrainFuck compiler
# Duplicate input file
cat $1 >inp.bf
# Strip comments
sed -i -e 's/[A-Za-z]*//g' inp.bf
# Incr and decr break the simple sed. Use temps instead
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@organisciak
organisciak / hterm_solarized.js
Last active July 14, 2019 09:23 — forked from russelldavies/hterm_solarized.js
Solarized for Mosh Chrome
// Solarized for Mosh Chrome
// Mosh does not seem to save profiles, so this sets the default 'mosh' profile.
// To reset, evaluate term_.prefs_.resetAll()
// Run in the JavaScript console of mosh_browser.html, which can be opened
// as explained here:
// https://github.com/rpwoodbu/mosh-chrome/wiki/FAQ#how-can-i-change-the-way-the-terminal-looks-font-color-etc
var htermProfiles = {
// Solarized Dark
@seantomburke
seantomburke / index.html
Created August 17, 2012 19:50
This is the iPhone Messages app created in full CSS. I use this on my website www.memebro.com. To see the full features visit http://www.memebro.com
<div id="iPhoneBro" class="iPhone gen">
<div class="title">
<input type="submit" class="back button" value="Messages">
<span class="contact_name button">(614) MEME-BRO</span>
<input type="submit" class="edit button" value="Edit">
</div>
<div id="conversation" class="conversation ">
<div class="time"><div class="time"><p>Aug 9, 2012 3:43 AM</p></div></div><div class="text sent" id="query"><div class="reflect"></div><p>Check Out <a href-"http://www.memebro.com/?r=codepen">memebro.com</a></p></div>
<div class="text receive"><div class="reflect"></div><p>Try "+popular", "+trending", or "+new" for meme lists</p></div>
<div class="text sent" id="query"><div class="reflect"></div><p>+popular</p></div>