Skip to content

Instantly share code, notes, and snippets.

View diogoalexsmachado's full-sized avatar

Diogo Machado diogoalexsmachado

View GitHub Profile
#!/bin/bash
git clone https://github.com/artf/grapesjs-preset-webpage.git && cd grapesjs-preset-webpage
npm i
npm i grapesjs --no-save
npm start
function validarNISS() {
var niss = $("#inputNISS").val();
//deve ter 11 dígitos
if(niss.length != 11) {
swal("Aviso", "O número de Segurança Social deverá ter 11 dígitos.", "warning");
} else {
var FACTORS = [29, 23, 19, 17, 13, 11, 7, 5, 3, 2];
var nissArray = [];
for (var i = 0; i < niss.length; i++) {
/*******************************************
* STRING RELATED FUNCTIONS *
* FROM http://stackoverflow.com/a/1144788 *
*******************************************/
function escapeRegExp(string) {
return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}
function replaceAll(find, replace, str) {
public class NISSValidator {
private NISSValidator() {
}
/**
* Validates if a given string niss is valid.
*
* @param niss number to validate
* @return true if the input is valid and false otherwise
@ECHO OFF
COLOR 1F
SET V=1.7
TITLE Windows 10 Registry tweaks for mining (x64) by: jsanzsp
REM ======================= Registry tweaks =======================
ECHO.
:regstart
set /p registry="Apply Registry tweaks? y/n: "
if '%registry%' == 'n' goto servstart
if /i "%registry%" neq "y" goto regstart
package com.teste.app;
public class Main {
public static void main(String[] args) {
int[][] nums = {{ 1, 2, 3, 4},
{ 5, 6, 7, 8},
{ 9, 10, 11, 12},
{13, 14, 15, 16}};
package com.teste.app;
public class Main {
public static void main(String[] args) {
int[][] nums = {{ 1, 2, 3, 4},
{ 5, 6, 7, 8},
{ 9, 10, 11, 12},
{13, 14, 15, 16}};
INSTALLATION
sudo cp ddclient /usr/sbin/
sudo mkdir /etc/ddclient
sudo mkdir /var/cache/ddclient
sudo cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
sudo nano /etc/ddclient/ddclient.conf
CONFIG FILE