This file contains hidden or 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 | |
| destfile=/home/user/pedidos/filtro.txt; | |
| touch --date "2015-10-01 00:00:00" /tmp/start | |
| array=($(find /home/user/pedidos/2*.txt -type f -newer /tmp/start |sort)) | |
| n=${#array[@]}; | |
| b=1 | |
| for ((x=0; x < $n; x++)); do | |
| echo "PEDIDO NÚMERO: " $(($x + $b)) >> "$destfile" |
This file contains hidden or 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 cpf() { | |
| var cpf = prompt('Digite seu CPF: '); | |
| cpf = cpf.replace(/[^\d]+/g,''); // Remove qualquer dígito que não seja número | |
| if (cpf.length != 11 || cpf.length === 0){ | |
| alert("O CPF deve conter 11 dígitos numéricos"); | |
| } else if (cpf == "00000000000" || cpf == "11111111111" || cpf == "22222222222" || cpf == "33333333333" || cpf == "44444444444" || cpf == "55555555555" || cpf == "66666666666" || cpf == "77777777777" || cpf == "88888888888" || cpf == "99999999999"){ | |
| alert("CPF inválido"); | |
| } else { | |
| add = 0; | |
| for (i=0; i < 9; i ++) |
This file contains hidden or 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
| mysqldump -uusuario -h xxx.xxx.xxx.xxx -p nomedobanco < nomedobanco.sql |
This file contains hidden or 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
| mysqldump -uusuario -h xxx.xxx.xxx.xxx -p nomedobanco > nomedobanco.sql |
This file contains hidden or 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 | |
| ############################################################################ | |
| # Enviar comando de configuração via SSH | |
| # para diversas RouterBoards Mikrotik simultaneamente | |
| # enviaSSH.sh – v.0.1 – 2011/03/01 | |
| # | |
| # Autor: Alexsandro Felix | |
| # Site: http://blog.ffelix.eti.br | |
| # E-mail/MSN/GTalk: felix@ffelix.eti.br | |
| # Este script pode ser copiado e modificado livremente, |
This file contains hidden or 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 | |
| ############################################################################ | |
| # Monitoraramento de host baseado em resposta de ping | |
| # pingHOST.sh - v.0.1 - 2011/03/01 | |
| # | |
| # Autor: Alexsandro Felix | |
| # Site: http://blog.ffelix.eti.br | |
| # E-mail/MSN/GTalk: felix@ffelix.eti.br | |
| # Este script pode ser copiado e modificado livremente, | |
| # desde que os devidos créditos sejam concedam ao autor os devidos créditos |
This file contains hidden or 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 http = require("http"); | |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/bemean-cascavel'); | |
| var db = mongoose.connection; | |
| db.on('error', function(err){ | |
| console.log('Erro de conexao.', err) | |
| }); | |
| db.on('open', function () { |
This file contains hidden or 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
| <!doctype html> | |
| <html data-ng-app="workshopBeMEAN"> | |
| <head> | |
| <title>{{ workshop }}</title> | |
| <style> | |
| .user-avatar { | |
| width: 200px; | |
| } | |
| .user-label { |
This file contains hidden or 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(){ | |
| 'use strict'; | |
| angular.module('BeerServiceModule', []) | |
| .service('BeerService', BeerService) | |
| ; | |
| function BeerService($http) { | |
| var urlBase = '//localhost:3000/beers'; |
This file contains hidden or 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
| 'use strict'; | |
| angular.module('myApp.Beers', ['ngRoute', 'BeerServiceModule']) | |
| .config(['$routeProvider', function($routeProvider) { | |
| $routeProvider | |
| .when('/beers', { | |
| templateUrl: 'modules/beers/list.html', | |
| controller: 'BeersList' | |
| }) |
NewerOlder