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
@aseemk
aseemk / coffeescript-updates.md
Last active December 2, 2017 20:22
CoffeeScript upcoming changes.

CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.

Parentheses-free chaining

jashkenas/coffeescript#3263

Years of being wished for, finally granted!

"data:application/octet-stream;base64,AGFzbQEAAAAByQM0YAABf2AEf39/fwBgAX8AYAAAYAF/AX9gA39/fwF/YAJ/fwBgCn9/f39+f35/f38Bf2ACf34AYAl/f39+f35/f38Bf2AJf39/fn9/fn9/AX9gCX9/f39+f35/fwF/YAR/f35/AX9gA39/fgBgBH9/fn8AYAJ/fwF/YAZ/f39+f38Bf2AHf39/fn9/fwF/YAV/f35/fwF/YAZ/f35/f38Bf2ADf39/AGABfwF+YAN/f38BfmAEf39/fwF/YAN/f34Bf2ACfn8BfmAFf39/f38AYAZ/f39/fn8AYAV/f39/fwF/YAJ+fgF+YAx/f39/f39/f39/f38Bf2AHf35/fn9+fwF/YAV/f35+fwF/YAR/fn9/AX9gCH9+f35/fn9/AX9gBn9/fn5/fwF/YAN/fn8Bf2AIf39/f35/fn8Bf2AIf39/f39+f34Bf2AFf39/fn8Bf2AGf39/fn9/AGAFf39/fn8AYAR/fn9/AGAFf39+f38AYAZ/f35/f38AYAZ/f35/fn8AYAR/f39+AGAHf39/f39/fwF/YAh/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAZ/f39/f38Bf2AKf39/f39/f39/fwF/AosCDQNlbnYORFlOQU1JQ1RPUF9QVFIDfwADZW52CFNUQUNLVE9QA38AA2VudgZtZW1vcnkCAYACgAIDZW52BXRhYmxlAXAAAANlbnYNZW5sYXJnZU1lbW9yeQAAA2Vudg5nZXRUb3RhbE1lbW9yeQAAA2VudhdhYm9ydE9uQ2Fubm90R3Jvd01lbW9yeQAAA2Vudg5fX19hc3NlcnRfZmFpbAABA2VudgtfX19zZXRFcnJObwACA2VudgZfYWJvcnQAAwNlbnYXX2Vtc2NyaXB0ZW5fYXNtX2NvbnN0X2kABANlbnYWX2Vtc2NyaXB0ZW5fbWVtY3B5X2JpZwAFA2Vudghfc3lzY29uZgAEA/
@Ben-PH
Ben-PH / strace.md
Last active June 6, 2020 02:56
Comaprison of C and Rust syscalls on startup/shutdown.

Abstract

For some situations, understanding system calls made during processes start-up and shut-down can be valuable. For example, consider a shell-scripts long-running hot loop that runs a very short-running process. Thus it is perhaps reasonable to hypothesise that a difference in system calls during process start-up/shut-down has a non-negligable impact on the run time of said hot-loop.

This write-up looks at how C and Rust programs differ in terms of system-calls for start-up/shutdown. It is not intended as a performance analysis and only looks at one target system.

At the end, we take a quick look at using statically linked libraries by building with # cargo build --target x86_64-unknown-linux-musl --release and removing even more syscalls by removing the main function

System

@Zenexer
Zenexer / Internet Slang and Emoticons.md
Last active February 14, 2022 23:32
Internet slang, abbreviations, and emoticons
@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);
@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 {}
}
@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/
@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)
@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', {
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