This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set menu_color_normal=white/black | |
set menu_color_highlight=black/light-gray | |
menuentry "Try openSUSE Tumbleweed GNOME Live ISO" { | |
set gfxpayload=keep | |
set iso_path=/openSUSE-Tumbleweed-GNOME-Live-x86_64-Snapshot20180220-Media.iso | |
loopback loop0 ${iso_path} | |
echo Loading kernel... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A simple commandline tool to show system Shutdown/suspend/hibernate/restart dialog. | |
# this tool can be used in any modern linux desktop environemtnt provided the following packages are instaleld | |
# * systemd - The new system service manager | |
# * yad - A powerfull alternative to zenity or 'dialog' command | |
yad \ | |
--on-top \ | |
--center \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Implementation of lodash.get function */ | |
function getProp( object, keys, defaultVal ){ | |
keys = Array.isArray( keys )? keys : keys.split('.'); | |
object = object[keys[0]]; | |
if( object && keys.length>1 ){ | |
return getProp( object, keys.slice(1) ); | |
} | |
return object === undefined? defaultVal : object; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var handlers = { | |
Object: flattenObject, | |
Array: flattenArray, | |
}; | |
function router(val, store, prefix, i ) { | |
var kind, handler, key = prefix? prefix + '.'+ i : i; ; | |
if( val === undefined || val === null ){ | |
return store[ key ] = val; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set menu_color_normal=white/black | |
set menu_color_highlight=black/light-gray | |
# File name of ISO file | |
set ubu_path=/ubuntu-16.04-desktop-amd64.iso | |
menuentry "Try Ubuntu without installing Failsafe" { | |
# Search for iso file in all paritions and set the partition as root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DomainName="yourdomain.example.com"; | |
echo "Generating Root CA key" | |
[[ -f rootCA.key ]] || openssl genrsa -des3 -out rootCA.key 2048 | |
echo "Generating Root CA certificate" | |
[[ -f rootCA.pem ]] || openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
innodb_buffer_pool_size=10G | |
query_cache_size=64M | |
skip-name-resolve | |
max_heap_table_size=64M | |
tmp_table_size=64M | |
max_connections = 200 | |
innodb_read_io_threads = 64 | |
innodb_write_io_threads = 64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getStdin = require('get-stdin'); | |
/* Usage */ | |
/* | |
>> cat file.html | node multiline-to-js.js | |
*/ | |
/* Input */ | |
/* | |
<div class="tab-pane active" > | |
<div class="card-box"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Adds a catchIf method to Promise. | |
Usage | |
Promise.reject( new TypeError() ) | |
.catchIf( TypeError, function handler(err){ console.log('TypeError handled')} ) | |
.catchIf( RangeError, function handler(err){ console.log('RangeError handled')} ) | |
*/ | |
function addCatchIf ( promiseClass ){ | |
promiseClass.prototype.catchIf = function(){ |