Skip to content

Instantly share code, notes, and snippets.

View vitali2y's full-sized avatar
🏠
/me @ 127.0.0.1

Vitaliy Yermolenko vitali2y

🏠
/me @ 127.0.0.1
  • $HOME @ Ukraine @ Earth
View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 3, 2024 10:52
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Nemo157
Nemo157 / _Publishing crates to IPFS.md
Last active March 26, 2024 20:46
Publishing crates to IPFS

Publishing crates to IPFS

This was an experiment in seeing how feasible it would be to distribute crates on IPFS using the alternative registries feature combined with a local IPFS web gateway.

There was very little plan for this originally, and I wish I had kept more of the intermediate states as I went through multiple major design changes. My original goal was to publish my CLI utility [bs58-cli][] and its dependency tree.

@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
@Rebolon
Rebolon / vue.debug.js
Created November 5, 2016 20:50
A solution to use debugger in v-for for VueJS
<ul id="pages-block">
<li v-for="page in pages">
<a v-bind:href="page.url">{{page.name}}</a>
<debug :item="page"/>
</li>
</ul>
...
Vue.component('debug', {
@antonydevanchi
antonydevanchi / 00-all.txt
Last active March 23, 2023 12:34
List of values HTTP Header "User-Agent" which you may meet in the real world. Crafted by hands from nginx's access.log entire many high-loaded projects
"Mozilla/5.0
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"
'Cloud mapping experiment. Contact research@pdrlabs.net'
'Mozilla/5.0 (compatible; Seekport Crawler; http://seekport.com/'
() { :; }; echo ; echo ; /bin/cat /etc/passwd
(CASE WHEN (1933=6210) THEN 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/531.4 (KHTML, like Gecko) Chrome/3.0.194.0 Safari/531.4' ELSE 1933*(SELECT 1933 FROM DUAL UNION SELECT 6210 FROM DUAL) END)
(CASE WHEN (3405=3405) THEN 3405 ELSE 3405*(SELECT 3405 FROM DUAL UNION SELECT 8193 FROM DUAL) END)
(CASE WHEN (5046=4939) THEN 5046 ELSE 5046*(SELECT 5046 FROM DUAL UNION SELECT 4939 FROM DUAL) END)
(CASE WHEN (7404=7404) THEN 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/531.4 (KHTML, like Gecko) Chrome/3.0.194.0 Safari/531.4' ELSE 7404*(SELECT 7404 FROM DUAL UNION SELECT 6679 FROM DUAL) END)
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@kekeimiku
kekeimiku / rust-helloworld.rs
Last active March 26, 2022 07:27
The tiny rust-x64-helloworld experiment
#![no_std]
#![no_main]
use core::arch::asm;
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
@codesections
codesections / server.rs
Last active March 20, 2022 04:35
Naive static file server in rust
use std::io::prelude::*;
use std::net::TcpListener;
use std::net::TcpStream;
mod app;
fn main() {
let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
for stream in listener.incoming() {
let stream = stream.unwrap();
handle_connection(stream);