Skip to content

Instantly share code, notes, and snippets.

View sherlock1982's full-sized avatar

Nikolai Orekhov sherlock1982

View GitHub Profile
public class RootViewController<Content: View>: UIHostingController<Content> {
public init(view: Content, rootViewManager: RootViewManager) {
super.init(rootView: view)
rootViewManager.rootViewController = self
}
@objc required dynamic init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@redeye86
redeye86 / emojione_light.js
Created September 4, 2018 14:34
Lightweight unicode to emojione converter -- library
(function(ns){
ns.MAX_EMOJI_LENGTH = 7;
ns.IMAGE_PREFIX = '<img src="images/';
ns.IMAGE_POSTFIX = '.svgz" class="emoji">';
ns.emojiMapping = {s:{"0034":{e:1,s:{"20e3":null}},"2b1b":null,"0039":{e:1,s:{"20e3":null}},"00ae":null,"0037":{e:1,s:{"20e3":null}},"0038":{e:1,s:{"20e3":null}},"0031":{e:1,s:{"20e3":null}},"0036":{e:1,s:{"20e3":null}},"0030":{e:1,s:{"20e3":null}},"3030":null,"303d":null,"002a":{e:1,s:{"20e3":null}},"3297":null,"0035":{e:1,s:{"20e3":null}},"2b55":null,"2b07":null,"0032":{e:1,s:{"20e3":null}},"2b06":null,"2b50":null,"2b05":null,"0033":{e:1,s:{"20e3":null}},"2935":null,"2b1c":null,"00a9":null,"26ab":null,"203c":null,"2692":null,"3299":null,"2122":null,"267f":null,"2049":null,"2194":null,"2139":null,"2196":null,"2195":null,"2198":null,"2197":null,"21a9":null,"2199":null,"231a":null,"21aa":null,"231b":null,"2753":null,"274e":null,"2755":null,"2754":null,"2763":null,"2757":null,"2795":null,"2744":null,"2797":null,"2796":null,"27a1":null,"27b0":null,"27bf":null,"274c":null
@redeye86
redeye86 / generate.php
Created September 4, 2018 14:32
Lightweight unicode to emojione converter -- generator
<?php
/**
* This php script generates a simplified javascript library that translates unicode emojis to their emojione graphics.
* It uses a space-efficient tree structure. For emojione 4.0 the library has ~38kb / ~5kb gzip compressed.
*
*
* USAGE:
* - create a subdirectory containing all emojione images in code point name scheme
* - change config in this file (image folder path, file extension, etc.)
* - php generate.php > emojione_light.js

Install .NET Core on Debian Stretch

Execute the following :

sudo apt-get install curl libunwind8 gettext
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=847105
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
@aarroyoc
aarroyoc / apt-ftparchive.conf
Last active March 5, 2024 10:45
Debian/Ubuntu repo using apt-ftparchive
Dir {
ArchiveDir "./debian";
CacheDir "./cache";
};
Default {
Packages::Compress ". gzip bzip2";
Sources::Compress ". gzip bzip2";
Contents::Compress ". gzip bzip2";
};
TreeDefault {