Skip to content

Instantly share code, notes, and snippets.

View falsam's full-sized avatar

falsam falsam

View GitHub Profile
@falsam
falsam / Matrixeffect.pb
Created November 10, 2016 14:26
Matrix effect
ExamineDesktops() : sw=DesktopWidth(0) : sh=DesktopHeight(0)
InitSprite()
OpenScreen(sw,sh,DesktopDepth(0),"")
InitKeyboard() : SpriteQuality(1)
If sh=>1200
a=256
EndIf
f=FontID(LoadFont(-1,"Courier",sh/55,a))
StartDrawing(ScreenOutput())
@falsam
falsam / GetWanIp.pb
Last active April 20, 2016 15:18
PureBasic - Obtenir l'adresse IP public (WAN)
Procedure GetWanIp()
Protected IP.s, Dim IP(4), n
Protected *Buffer = ReceiveHTTPMemory("https://api.ipify.org?format=json")
If *Buffer
ParseJSON(0, PeekS(*Buffer, MemorySize(*Buffer), #PB_UTF8))
FreeMemory(*Buffer)
IP = GetJSONString(GetJSONMember(JSONValue(0), "ip"))
For n = 1 To CountString(IP, ".") + 1