Skip to content

Instantly share code, notes, and snippets.

View FusRoDah061's full-sized avatar

Allex Rodrigues FusRoDah061

  • Nelogica
  • Campinas - SP
View GitHub Profile
@FusRoDah061
FusRoDah061 / .gitignore
Created May 28, 2017 03:25 — forked from kmorcinek/.gitignore
Example .gitignore file I use for C# projects
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files
*.suo
*.user
*.sln.docstates
@FusRoDah061
FusRoDah061 / js-loader.js
Created January 15, 2018 18:04
Javascript loader
function Loader() {
var id = "091435";
this.init = function (parentId) {
//CSS
$("body").prepend("<style>.loader{color:#fff;position:fixed;box-sizing:border-box;left:-9999px;top:-9999px;width:0;height:0;overflow:hidden;z-index:999999}.loader:after,.loader:before{box-sizing:border-box;display:none}.loader.is-active{background-color:rgba(0,0,0,.85);width:100%;height:100%;left:0;top:0}.loader.is-active:after,.loader.is-active:before{display:block}@keyframes rotation{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes blink{from{opacity:.5}to{opacity:1}}.loader[data-text]:before{position:fixed;left:0;top:50%;color:currentColor;font-family:Helvetica,Arial,sans-serif;text-align:center;width:100%;font-size:14px}.loader[data-text='']:before{content:'Loading'}.loader[data-text]:not([data-text='']):before{content:attr(data-text)}.loader[data-text][data-blink]:before{animation:blink 1s linear infinite alternate}.loader-default[data-text]:before{top:calc(50% - 63px)}.loader-default:
@FusRoDah061
FusRoDah061 / send_sms.php
Created February 23, 2018 17:14
Envia SMS por PHP utilizando API da DirectCall <http://www.directcall.com.br/api_telefonia_sms_gravacao>
<?php
//Site do tutorial: http://tutoriais.directcall.com.br/enviar-sms-com-php/
function requisicaoApi($params, $endpoint){
$url = "http://api.directcallsoft.com/{$endpoint}";
$data = http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
@FusRoDah061
FusRoDah061 / excel.php
Last active February 23, 2018 19:40
Gerar planilha do excel em PHP através de dados do MySQL usando o PhpSpreadsheet <https://github.com/PHPOffice/PhpSpreadsheet>
<?php
/*
Estrutura das tabelas do banco de dados:
CREATE TABLE pessoas (
nome varchar(100) NOT NULL,
idade int(11) NOT NULL,
sexo varchar(1) NOT NULL,
altura double NOT NULL,
@FusRoDah061
FusRoDah061 / toast.html
Last active March 2, 2018 22:55
Android toast on JS
<!DOCTYPE html>
<html>
<head>
<title>Android Toast</title>
</head>
<body>
<script>
function Balanca(idParent){
var idBraco = "js-balanca-braco";
var idPesoEsquerdo = "js-balanca-peso-esq";
var idPesoDireito = "js-balanca-peso-dir";
var idLegendaEsquerda = "js-peso-legenda-esq";
var idLegendaDireita = "js-peso-legenda-dir";
var elParent;
var corLegendaEsquerda = "#000";
public class Logger
{
public static void Log(object msg, bool newLine = true)
{
string message = "<" + DateTime.Now.ToString() + "> " + msg.ToString() + ((newLine) ? "\n" : "");
Console.Write(message);
LogFile(message, _getFileName());
@FusRoDah061
FusRoDah061 / ConfigManager.cs
Created February 22, 2019 18:10
Gerenciador de configurações utilizando Sharp-Config 1.0.0
using SharpConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FolderScannerClassLibrary
{
public class ConfigManager
public class Crypt
{
public string SHA1(string input)
{
using (SHA1Managed sha1 = new SHA1Managed())
{
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
@FusRoDah061
FusRoDah061 / savevideo-me.js
Created March 9, 2019 22:18
Entre na página do vídeo (dailymotion apenas). Clique para redirecionar para o embed, clique denovo para baixar o vídeo.
javascript: (function () {
appPath = 'https://savevideo.me/pt/';
function redirect (){
var url = window.location.href;
if(url.indexOf("embed") == -1)
{
var position = url.indexOf(".com/") + 5;
url = [url.slice(0, position), "embed/", url.slice(position)].join('');