Skip to content

Instantly share code, notes, and snippets.

View stokito's full-sized avatar
Self-hosting become easier 🤗

Sergey Ponomarev stokito

Self-hosting become easier 🤗
View GitHub Profile
@jppommet
jppommet / bcm4352-wifi-ac.md
Created July 4, 2014 20:03
Linux Ubuntu Drivers for Broadcom Chipset BCM4352 802.11ac Wireless Network Adapter [14e4:43b1]
@artyom
artyom / result.txt
Created July 10, 2014 14:39
Golang XOR performance for 8/64 bytes long integers
$ go test -bench .
PASS
Benchmark8 1000000 1093 ns/op 936.69 MB/s
Benchmark64 20000000 134 ns/op 7603.74 MB/s
ok _/private/tmp/x 3.944s
@ttaubert
ttaubert / onion-gen.js
Created November 2, 2014 13:14
Generating custom .onion names with the WebCrypto API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* thirty-two
* https://github.com/chrisumbel/thirty-two
*
@stokito
stokito / BeerSpec.groovy
Created November 17, 2014 17:10
Test task
import spock.lang.Specification
import spock.lang.Unroll
/**
A programmer drinks exactly goalPints of beer every evening.
One evening, the programmer opens his fridge and sees a number of smallBottles of beer (1 pint each) and a number of bigBottles of beer (3 pints each).
The programmer needs to decide whether he can pick some bottles and start drinking, or has to run to the store to buy some more bottles.
The programmer is "greedy" and never consumes a bottle partially.
Write a Java-method which returns true if it is possible to make the goal by choosing from the given (whole) bottles, or false otherwise.
Note that it is not necessary to "take" all bottles — some may remain unused.
@samueltcsantos
samueltcsantos / ArrayListTest.java
Created February 5, 2015 04:13
Testing the ArrayList implementation.
package adt.list;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
/**
* Testing the ArrayList implementation.
@egel
egel / get-gravatar-image.sh
Last active February 12, 2021 22:46 — forked from kristopherjohnson/gravatar.sh
Download Gravatar image for an email address
SIZE=500
EMAIL="[email protected]"
curl "http://www.gravatar.com/avatar/$(echo -n ${EMAIL} | md5sum | awk '{print $1}')?s=${SIZE}" > gravatar.png
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active June 20, 2025 12:40
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@jamielaundon
jamielaundon / create-pfx
Created January 22, 2016 22:02
Create IIS .pfx from Let's Encrypt fullchain and privkey
sudo openssl pkcs12 -export -in /etc/letsencrypt/live/domain.com/fullchain.pem -inkey /etc/letsencrypt/live/domain.com/privkey.pem -out domain.com.pfx
@zhehaowang
zhehaowang / Creating and Configuring OpenWRT virtualbox
Last active August 11, 2022 18:59
Creating and Configuring OpenWRT virtualbox
Creating and Configuring OpenWRT virtualbox
http://hoverbear.org/2014/11/23/openwrt-in-virtualbox/
Given the setup, accessing local openwrt via ssh
ssh root@localhost -p 2222
scp -P 2222 somefile root@localhost:
@ukautz
ukautz / cert_load.go
Created March 2, 2016 18:55
Go: Load all .pem files containing private key and certificate(s) from directory
package common
import (
"crypto"
"crypto/ecdsa"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"fmt"