Skip to content

Instantly share code, notes, and snippets.

View radxene's full-sized avatar

Radu Ene radxene

  • Moldova, Chisinau
View GitHub Profile
@radxene
radxene / xterm-256color.svg
Created January 13, 2024 09:45 — forked from jasonm23/xterm-256color.svg
Xterm 256color mode color chart, organised into sections. (used on Wikipedia/xterm)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@radxene
radxene / alacritty.toml
Created January 10, 2024 18:08
Alacritty config file
live_config_reload = true
[shell]
program = "/usr/local/bin/fish"
args = ["-l"]
[colors]
draw_bold_text_with_bright_colors = true
[colors.bright]
@radxene
radxene / main.rs
Created December 30, 2023 16:36 — forked from icub3d/main.rs
Advent of Code 2023 - Day 22
use std::{
cell::RefCell,
collections::{HashMap, HashSet, VecDeque},
rc::Rc,
};
// Point is used to track the start and end of a block.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
struct Point {
x: usize,
@radxene
radxene / SwiftForVsCode.md
Created January 11, 2022 10:36
Swift Development with Visual Studio Code

Swift Development with Visual Studio Code

Visual Studio Code (VSCode) is a cross-platform text and source code editor from Microsoft. It’s one of the most exciting open source projects today, with regular updates from hundreds of contributors.

Step 0: Install Xcode

If you don’t already have Xcode installed on your machine, open the Terminal app and run the following command:

xcode-select --install
@radxene
radxene / AlphaHex.md
Created January 2, 2022 12:53
Hexadecimal color code for transparency

Hexadecimal color code for transparency

For example, you want to set 50% alpha transparence to #000000 (black color), you need to add 80 like this #80000000.

All hex value from 100% to 0% alpha:

  • 100% — FF
  • 99% — FC
  • 98% — FA
  • 97% — F7
!(function() {
'use strict';
var fruits = [
{ apple: 100, pear: 23, cherry: 40 },
{ apple: 400, pear: 34, cherry: 90 },
{ apple: 20, pear: 60, cherry: 100 },
];
var header = ['яблоки', 'груши', 'вишенка'];
import unittest
from src.proxy import ManipStr
class TestManipStr(unittest.TestCase):
def setUp(self):
self.manip = ManipStr()
def test_rm_host_habra(self):
@radxene
radxene / proxy.py
Created February 7, 2019 08:35
Habraproxy - local http proxy server (Хабрапрокси)
from urllib.parse import urlparse, urljoin
from http.server import BaseHTTPRequestHandler, HTTPServer
import requests
import lxml.etree as etree
class ManipStr(object):
@staticmethod
def rm_host_habra(url):
@radxene
radxene / read_and_merge.js
Created December 28, 2018 19:30
Read all files from directory and write their contents into one file.
#!/usr/bin/env node
const fs = require('fs');
const os = require('os');
const path = require('path');
const readline = require('readline');
const pkgDir = path.join(os.homedir(), '.emacs.d/scripts/pkg');
const outputFile = path.join(os.homedir(), '.emacs.d/scripts/packages.el');
@radxene
radxene / working_with_files.go
Created October 10, 2017 09:18
Golang - Working with Files
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*-- CREATE EMPTY FILE --*/
package main
import (
"log"
"os"
)