Skip to content

Instantly share code, notes, and snippets.

View cletrix's full-sized avatar

Cleyton Pedroza de Almeida cletrix

View GitHub Profile
@cletrix
cletrix / CompleteHaxeLimeInstall_Menu_RPi.sh
Created August 23, 2024 18:59 — forked from gepatto/CompleteHaxeLimeInstall_Menu_RPi.sh
Install Haxe,Lime and OpenFL on a Raspberry Pi running PiOS (raspbian bullseye)
#!/bin/bash
##########################################
# Gepatto 2023 #
# find me on openfl or haxe discord #
##########################################
### Color Variables ###
BLACK="\e[30m"
RED="\e[31m"
@cletrix
cletrix / client.py
Created January 1, 2023 21:15 — forked from stevvooe/client.py
A minimal python to go json-rpc implemention, sans HTTP
import json
import socket
s = socket.create_connection(("127.0.0.1", 5090))
s.sendall(json.dumps(({"id": 1, "method": "Hello.Hello", "params": ["hello"]})))
print s.recv(4096)
@cletrix
cletrix / HttpServer.cs
Created December 23, 2022 14:20 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@cletrix
cletrix / sketch-never-ending.md
Created January 22, 2022 18:21 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

# Install Haxe using Brew and set the haxelib path
brew install haxe
haxelib setup /usr/local/Cellar/haxe/lib
# Install lime
haxelib install lime
haxelib run lime setup
# Install lime tools
haxelib install format
@cletrix
cletrix / facebook_leads.md
Created June 14, 2017 23:18 — forked from tixastronauta/facebook_leads.md
Receiving Facebook Leads on a Webhook

Receiving Facebook Leads on a Webhook

1 - Create an App

Head over to developer.facebook.com and create an App

2 - Setup the webhook

On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.5

@cletrix
cletrix / Makefile
Created May 4, 2017 12:47 — forked from nzjrs/Makefile
Python ctypes example
all: test libtest.so testmodule
libtest.so: libtest.c
$(CC) -Wall -g -fPIC -shared -o $@ $? -lc
test: test_main.c libtest.o
$(CC) -o $@ $?
testmodule: testmodule.c
python setup.py build
@cletrix
cletrix / simple_websocket_client.html
Created February 5, 2016 00:11 — forked from geoffb/simple_websocket_client.html
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
@cletrix
cletrix / rest-server.py
Created January 11, 2016 11:33 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@cletrix
cletrix / install_Haxe_Neko_hxcpp_lime _OpenFL.txt
Created November 13, 2015 11:51
Install Haxe, Neko, hxcpp, lime and OpenFL (3.2.2) on a raspberry pi 2 ( 06-08-2015 )
sudo apt-get install libgc-dev libpcre3-dev
sudo apt-get install mesa-utils build-essential git cmake libx11-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libasound2-dev
#optional but recommended
sudo apt-get install sqlite3 libsqlite3-dev
sudo apt-get install libgtk2.0-dev (installs a lot of dependencies)
sudo apt-get install libmysqlclient-dev
#end optional