Skip to content

Instantly share code, notes, and snippets.

View pczarn's full-sized avatar
🇵🇱
Proland

Peter Blackson pczarn

🇵🇱
Proland
  • Poland
View GitHub Profile
@pczarn
pczarn / .gitignore
Last active June 17, 2024 12:13
mini-earley
/target
callgrind.out.*
@Popog
Popog / retain_iterator.md
Last active November 15, 2016 08:43
Updated for new pair layout and fixed several bugs
  • Feature Name: retain_iterator
  • Start Date: 10/6/2016
  • RFC PR: (leave this empty)
  • Rust Issue: (leave this empty)

Summary

New API for std::collections::HashMap and std::collections::HashSet. Modification to the retain API for std::vec::Vec and std::collections::vec_deque::VecDeque.

@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@deadalusai
deadalusai / tasks.json
Last active June 24, 2024 10:17
VS Code tasks.json for Rust/Cargo
/*
Before using this tasks.json you may like to consider trying one of the following VS Code extensions:
rust-analyzer
Marketplace: https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer
Source: https://github.com/rust-analyzer/rust-analyzer
rls
Marketplace: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
Source: https://github.com/rust-lang/rls-vscode
#![feature(unboxed_closures, default_type_params)]
use std::collections::HashMap;
use std::cell::RefCell;
use std::thunk::Invoke;
#[deriving(Copy, Clone, Show)]
struct Ident(uint);
#[deriving(Show)]
> % rustc hello.rs --target=psp -lpspdebug -lpspdisplay -lpspge -lm -lc -lpspuser -lgcc
> % psp-fixup-imports hello && psp-prxgen hello hello.prx
@staltz
staltz / introrx.md
Last active July 6, 2024 17:07
The introduction to Reactive Programming you've been missing
@kmcallister
kmcallister / gist:f19ac199bc3de8a4649d
Last active August 29, 2015 14:02
HTML token match macro
states::InHead => match_token!(token {
CharacterTokens(NotSplit, text) => Split(KeepWhitespace, text),
CharacterTokens(Whitespace, text) => append_text!(self.target(), text),
CommentToken(text) => append_comment!(self.target(), text),
tag @ <base> <basefont> <bgsound> <link> <meta> => {
self.create_element_nopush(tag.name, tag.attrs);
Done
use std::io;
fn main() {
println!("digraph \\{");
let mut input = io::stdin();
let mut lines = input.lines();
loop {
match lines.next() {
Some(line) => {
let line = line.unwrap();
let line = line.as_slice();
@pczarn
pczarn / README.md
Last active August 29, 2015 14:01
Layout analysis of Rust's structs

Struct layout: total space occupied by padding

(including drop flags and tail padding)

total padding (bytes) number of structs
0 641
1 6
2 7
3 15