View date.js
function isDiaMesAno(dd_mm_yyyy) {
var matches = String(dd_mm_yyyy).trim().match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/)
var date = matches && new Date(matches[3], matches[2] - 1, matches[1]);
return !!(date && (date.getMonth() + 1) == matches[2]);
function isHoraMinuto(hh_mm) {
var matches = String(hh_mm).trim().match(/^(\d{2}):(\d{2})$/)
var date = matches && new Date(2017, 0, 1, matches[1], matches[2]);
return !!(date && date.getHours() == matches[1]);
View strategy.js
function Strategy(fn) {
//if (!(this instanceof Strategy)) throw new TypeError('Please use new operator with Strategy')
if (typeof fn !== function) throw new TypeError('Strategy constructor expects a function')
this.execute = function() { fn.apply(null, arguments) }
# reference
git clone
cd ccminer
# put (GTX 960)
View random-base58.js
function randomBase58(digits) {
digits = digits || 0
var base58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'.split('')
var result = ''
var char
while (result.length < digits) {
char = base58[Math.random() * 57 >> 0]
if (result.indexOf(char) === -1) result += char // avoid repetitions
return result
# utilizar parted ou cgdisk
# definir particao EFI (hex EF00 no gdisk e cgdisk) com tamanho de 1GiB
# formatar particao EFI como FAT32 (nao formatar caso já exista particao com windows bootloader)
# utilizar FAT16 para algumas distros.
# windows e alguns firmwares nao aceitam FAT16 para EFI, por isso a instalação recomendada abaixo é com FAT32
# If you get the message WARNING: Not enough clusters for a 32 bit FAT!,
# reduce cluster size with mkfs.fat -s2 -F32 ... or -s1; otherwise the partition may be unreadable by UEFI.
mkfs.fat -F32 /dev/sdxY
mkfs.ext4 /dev/sdxZ

Install No-IP Client If needed install Packer on Arch Linux or install Yaourt on Arch Linux or use another package wrapper.

Install No-IP Client with packer.
packer -S noip

Configure No-IP Back-end Create the configuration file.

  • Legacy BIOS bootable attribute -- This is the official name of the relevant feature, as described in the UEFI specification (version 2.3.1, p. 105, Table 19). It's set by setting the "legacy_boot flag" in parted or its relatives, or by setting attribute bit #2 using the "a" option on the experts' menu in gdisk. (The wiki to which you linked describes doing this with sgdisk.) It's used by SYSLINUX's GPT support to identify a partition that holds second-stage boot code.
  • The "boot flag" on MBR disks -- On MBR disks, the "boot flag" is a bit that can be set using either fdisk or parted. It's analogous to the GPT legacy BIOS bootable attribute, since it serves the same purpose. Note that on a GPT disk, it's possible (although technically a violation of the spec) to set this flag on the protective 0xEE partition. You can do this with fdisk, but not with parted, since the latter lacks a user interface to do anything explicit with the protective 0xEE MBR partition. (This is reportedly changing with in-development
pacman -S $(pacman -Qqen)
pacaur -S $(pacaur -Qqem) --noedit
View validator.js
function validate(obj) {
function validator(prop) {
return function(validateFn) {
var res = validateFn(obj[prop])
if (!Array.isArray(res)) throw 'Validation function must return an array of arrays'
res.forEach(arr => {
if (!Array.isArray(arr)) throw prop + ' validation "' + JSON.stringify(arr) + '" requires a string as first item'
if (typeof arr[0] !== 'string') throw prop + ' validation "' + JSON.stringify(arr) + '" requires a string as first item'
var invalidation = res.find(propVal => !propVal[1])
View etc-default-grub
# !!! add "intel_pstate=disable" to CMDLINE_LINUX_DEFAULT for no CPU sleeps (when NVidia freezes, bad drivers)
# !!! blacklisting nouveau for better proprietary handling
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 quiet sysrq_always_enabled=1"