Skip to content

Instantly share code, notes, and snippets.

View kioqq's full-sized avatar
🥷

Evgeniy Abramov kioqq

🥷
View GitHub Profile
@lynsei
lynsei / deploy-your-own-saas.md
Last active January 19, 2024 20:22
[how to unpack an xpi | asar, reference] #asar #xpi #unpack #xpi-unpack #firefox-extension #userChrome.css #hack #userChrome.css does stuff
# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@egg82
egg82 / coredns_client.md
Last active November 21, 2020 04:53
CoreDNS on clients

Notes

This guide was designed for a fresh install of Ubuntu desktop 20.04

Edit the file /etc/sysctl.conf and add (or edit) the following line:

net.core.rmem_max=8388608

Reload sysctl

@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@expelledboy
expelledboy / uninstall-nix-osx.sh
Last active November 26, 2023 15:53
Trying Nix
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@corrieriluca
corrieriluca / App-Store-Connect-API-Python.md
Last active April 23, 2024 04:50
Connection to the App Store Connect API using Python3
@bochsdbg
bochsdbg / main.c
Last active December 23, 2018 16:37
small hdd benchmark
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#include <memory.h>

Add private nameserver to coredns

0- Default Coredns config

.:53 {
    errors
    health
    ready
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 2, 2024 08:36
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@davydovanton
davydovanton / dry_monads_with_handler.rb
Last active February 20, 2019 13:06
dry_monads_with_handler
def result_handler(result)
case result
when Success, Some
puts 'success, user created'
when Failure { |message, _| message == :http_error }
puts "HTTP request error, #{result.failure[2]}"
when Failure { |message, _| message == :validation_error }
puts "validation error, #{result.failure[2]}"
when Failure(ROM::Error)
puts 'User not created'