Skip to content

Instantly share code, notes, and snippets.

View wupsbr's full-sized avatar

David Ruiz wupsbr

View GitHub Profile
@wupsbr
wupsbr / CheckAPIAndChangeColor.lua
Created April 8, 2024 05:47
Dev2Blox - CheckAPIAndChangeColor
local ColorChangeAPI = require(game.ServerScriptService.ColorChangeAPI)
while true do
ColorChangeAPI.CheckAPIAndChangeColor()
wait(1) -- Espera 5 segundos antes de verificar novamente
end
@wupsbr
wupsbr / ColorChangeAPI.lua
Created April 8, 2024 05:45
Dev2Blox - ColorChangeAPI
local HttpService = game:GetService("HttpService")
local Module = {}
-- Lista dos nomes de sinais permitidos para atualização
local allowedSignals = {
objSinal1 = true,
objSinal2 = true,
objSinal3 = true,
objSinal4 = true
}
@wupsbr
wupsbr / index.html
Created June 2, 2020 11:54
[Prensa - David] // source https://jsbin.com/mewasad
<meta name="description" content="[Prensa - David]">
<div id="x_x_Signature">
<div></div>
<div></div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;">
<table style="color:#363636;font-size:medium;font-family:sans-serif;background-color:white;border-collapse:collapse;max-width:580px;line-height:1.5;">
<tbody><tr>
<td>
<table style="color:#323232;width:315px;border-collapse:collapse;line-height:16px;">
<tbody><tr>
Verifying that "wupsbr.id" is my Blockstack ID. https://onename.com/wupsbr
@wupsbr
wupsbr / nginx
Created October 28, 2015 14:18 — forked from damncabbage/nginx
Monit, Nginx and multiple check types.
# /etc/monit/conf.d/nginx
check program nginx-http with path "/etc/monit/bin/nginx-check.sh"
group www
group nginx
start program = "/bin/true" # Prevent duplicate service starts.
stop program = "/usr/sbin/service nginx stop" # We don't care if it tries to kill nginx multiple times. :)
if status != 0 then restart # or alert, or whatever
depends on nginx-pid # Don't even try to run until the pidfile is there.
check process nginx-pid with pidfile "/run/nginx.pid"
/*
Poor Man's Telnet - a tiny Galileo/Arduino sketch to talk to the
Galileo underlying Linux command line.
By Mikal Hart
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
# Node-WebKit CheatSheet
# Download: https://github.com/rogerwang/node-webkit#downloads
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions
# Wiki: https://github.com/rogerwang/node-webkit/wiki
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium
# 1. Run your application.
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2

// phantomjs code to log in to Amazon
// based on the code from this Stackoverflow answer: http://stackoverflow.com/questions/9246438/how-to-submit-a-form-using-phantomjs
// I'm injecting jQuery so this assumes you have jquery in your project directory
var page = new WebPage(), testindex = 0, loadInProgress = false;
page.onConsoleMessage = function(msg) {
console.log(msg);
};
@wupsbr
wupsbr / gist:7086748
Created October 21, 2013 16:29
Exemplo de como fazer uma chamada AJAX (XMLHttpRequest) no Firefox OS em um domínio diferente da aplicação, evitando o erro de Cross-Origin. Aplicação completa em https://github.com/robnyman/Firefox-OS-Boilerplate-App
var xhr = new XMLHttpRequest({mozSystem: true});
xhr.open("GET", "http://robnyman.github.com/Firefox-OS-Boilerplate-App/README.md", true);
xhr.onreadystatechange = function ()
{
if (xhr.status === 200 && xhr.readyState === 4)
{
crossDomainXHRDisplay.innerHTML = "<h4>Result from Cross-domain XHR</h4>" + xhr.response;
crossDomainXHRDisplay.style.display = "block";
}
}