Skip to content

Instantly share code, notes, and snippets.

View TaizWeb's full-sized avatar
📝
Writing Code by Hand

Taiz TaizWeb

📝
Writing Code by Hand
  • Pikeville, TN
View GitHub Profile
@ivan-loh
ivan-loh / request.lua
Created November 16, 2015 04:21
sample lua http get
local http = require "socket.http"
local data = ""
local function collect(chunk)
if chunk ~= nil then
data = data .. chunk
end
return true
end
@developius
developius / README.md
Last active April 25, 2024 22:15
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@tylerneylon
tylerneylon / json.lua
Last active June 23, 2024 22:29
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@defp
defp / post.lua
Created August 20, 2013 20:19
use luasocket send post data
#!/usr/bin/env lua
local http=require("socket.http");
local request_body = [[login=user&password=123]]
local response_body = {}
local res, code, response_headers = http.request{
url = "http://httpbin.org/post",
method = "POST",
headers =