Skip to content

Instantly share code, notes, and snippets.

View hcortezr's full-sized avatar

Cortez hcortezr

  • Nevada
  • 03:04 (UTC -07:00)
View GitHub Profile
@hcortezr
hcortezr / Example.md
Created June 7, 2018 04:11
[ModPE] HTTPRequest

Example:

function newLevel(){
  clientMessage(new HTTPRequest("http://google.com").get());
}

function procCmd(str){
  let args = str.split(" ");
  let cmd = args.shift();
 
@hcortezr
hcortezr / Example.js
Last active March 9, 2018 03:22
Promisifyed Web Request
HTTPRequest(
"GET",
"https://edroid.tk/projects/serverstatus/info.php",
null,
{responseType: "json"}
).then(({data}) => console.log(data));
@hcortezr
hcortezr / EXAMPLE.md
Last active February 13, 2018 09:24 — forked from manast/interval.js
Accurate Javascript setInterval replacement
let int = createInterval(() => console.log("Hello!"), 1000);
int.run();

setTimeout(() => int.stop(), 5000);
@hcortezr
hcortezr / CommandClient_v1.js
Last active April 25, 2018 02:52
Discord Command Client
/**
* CommandClient
* have custom commands for your bot
* @author eDroid
*/
const Discord = require("discord.js");
class CommandClient {
constructor(client, prefix = "/"){
@hcortezr
hcortezr / DiscordCLI.js
Created December 7, 2017 07:33
DiscordCLI - the beginning to discord cli edition... jk.. idk tho.. who knows tbh..
const readline = require("readline");
class DiscordCLI {
constructor(client, options){
this.channel = null;
this.client = client;
this.options = {
exit_message: "EXIT_CHANNEL",
prompt_format: "#:channel [You] > ",
incoming_format: "#:channel [:sender] > :message"
<?php
/**
* ColorConverter
* @author eDroid
* @link https://edroidthedev.com
*/
class ColorConverter {
/**
* Hex to RGB
*
@hcortezr
hcortezr / C#.sublime-build
Created August 13, 2017 07:04
Build C# Console Apps in Sublime Text. (Windows)
{
// Make sure the %FrameworkDir% variable exists.
// Place the file in /Sublime Text/Data/Packages/User directory
// Open a .cs file and press CTRL+B
// Select 'C#'
// Voila
"shell_cmd": "%FrameworkDir%\\v4.0.30319\\csc.exe /nologo $file && ${file/\\.cs/\\.exe/}"
}