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
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 |
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
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}}; |
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
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}}; |
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
@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 |
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
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 |
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
/******************************************* | |
* STRING RELATED FUNCTIONS * | |
* FROM http://stackoverflow.com/a/1144788 * | |
*******************************************/ | |
function escapeRegExp(string) { | |
return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | |
} | |
function replaceAll(find, replace, str) { |
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
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++) { |
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
#!/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 |
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
# No inicio.jsp | |
<input type="hidden" id="controloAlteracoes" value="0"> | |
# no acesso.js (chamado no inicio.jsp) | |
$("#controloAlteracoes").change(function () { | |
if ($(this).val() == 1) { | |
toastr.clear(); | |
toastr["info"]("Existem informações não guardadas", "Atenção", { | |
"closeButton": true, | |
"debug": false, |
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
#!/bin/bash | |
# | |
# matrix: matrix-ish display for Bash terminal | |
# Author: Brett Terpstra 2012 <http://brettterpstra.com> | |
# Contributors: Lauri Ranta and Carl <http://blog.carlsensei.com/> | |
# | |
# A morning project. Could have been better, but I'm learning when to stop. | |
### Customization: | |
blue="\033[0;34m" |
OlderNewer