Skip to content

Instantly share code, notes, and snippets.

@NejcZdovc
NejcZdovc / custom.cc
Created October 24, 2020 07:53
Github dark mode custom css
/* CUSTOM */
.js-notifications-container {
max-width: 1300px;
margin: 0 auto !important;
}
.js-notification-sidebar-filters li:nth-child(1) {
display: none
}
.js-notification-sidebar-filters li:nth-child(2) {
display: none
@NejcZdovc
NejcZdovc / index.js
Created March 26, 2018 09:22
String to Uint8Array
// source https://coolaj86.com/articles/unicode-string-to-a-utf-8-typed-array-buffer-in-javascript/
'use strict';
// string to uint array
function unicodeStringToTypedArray(s) {
var escstr = encodeURIComponent(s);
var binstr = escstr.replace(/%([0-9A-F]{2})/g, function(match, p1) {
return String.fromCharCode('0x' + p1);
});
@NejcZdovc
NejcZdovc / brave_sortish_500.html
Created July 24, 2017 14:14
Brave import file
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file. It will be read and overwritten. DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
<DL><p>
<DT><H3>Imported</H3>
<DL><p>
@NejcZdovc
NejcZdovc / npm.bash
Last active May 18, 2017 07:05
Clean install of brave development
// Clean
npm cache clean
rm -rf ~/.node-gyp
rm -rf ~/.electron
rm -rf ~/Library/Application Support/brave-development
rm -rf node_modules
// Install
npm i
@NejcZdovc
NejcZdovc / npm.bash
Created April 25, 2017 10:39
Npm without sudo 
# Source https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/
# ----------------------
# install brew
# clean instal
brew install node --without-npm
mkdir "${HOME}/.npm-packages"
@NejcZdovc
NejcZdovc / app.js
Created December 22, 2015 07:46
IOS native app
/**
* IOS native app
* <meta name="apple-mobile-web-app-capable" content="yes">
*/
(function(document,navigator,standalone) {
if ((standalone in navigator) && navigator[standalone]) {
var curnode, location=document.location, stop=/^(a)$/i;
document.addEventListener('click', function(e) {
curnode=e.target;
while (!(stop).test(curnode.nodeName)) {
@NejcZdovc
NejcZdovc / React + es6 package.json
Last active October 14, 2015 06:18
Npm settings browserify/watchify => react + es6
{
"name": "react-compile",
"main": "index.js",
"devDependencies": {
"browserify": "latest",
"envify": "^3.2.0",
"react": "^0.13.0",
"reactify": "^0.17.1",
"watchify": "latest",
"babelify": "latest"