Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
Hunting bugs like Ghost Buster !

Moki Ding m0k1

👻
Hunting bugs like Ghost Buster !
View GitHub Profile
@m0k1
m0k1 / makrsizam.txt
Last active Aug 29, 2015
SVJETSKI POVRATAK MARKSIZMU
View makrsizam.txt
Planeta Zemlja je stara četiri milijarde godina. Za osam milijardi godina biti će potpuno pusti i sprženi beživotni otok u svemiru, uništena od sunca koji će se pretvoriti u crvenog diva. U međuvremenu jedna pomahnitala bulumenta budala uništavaju egzistenciju svojih bližnjih, većine čovječanstva, tjerajući ih u glad, nedostatak obrazovanja, razboljevanje, umiranje i nedostatak primjerene vremenu medicinske zaštite i osnovnih uvjeta za život; dokidajući time osnove za temelje ljudskog dostojanstva pojedinaca i čitave ljudske vrste. A, sve to jer žele imati stometarske jahte s tri helikoptera na palubama, desetke kuća po Toskanama, Provansama, Maldivima...iako istovremeno ne mogu biti na svim tim mjestima niti mogu u razumnim vremenskim periodima iskoristiti sve to što će korozija i zub vremena vrlo brzo pretvoriti u prah. A ako i prodaju sve to, opet ni oni ni njihovi potomci ne mogu sav taj novac pojesti već ga moraju trošiti opet na luksuz, do prvog burzovnog kraha ili povijesnih lomova društava. Pohlepno s
@m0k1
m0k1 / main.cs
Last active Aug 29, 2015
noobot_launcher src
View main.cs
namespace NooBot_Launcher
{
using Microsoft.Win32;
using NooBot_Launcher.Properties;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
@m0k1
m0k1 / gist:15a380962c71e6de0e91
Created Jan 18, 2015
Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from)
View gist:15a380962c71e6de0e91
#include <a_samp>
#include <streamer> //by Incognito http://forum.sa-mp.com/showthread.php?t=102865
#include <modelsizes> //by Y_Less http://forum.sa-mp.com/showthread.php?t=407909
#define STREAM_CONSTANT 180
stock StreamObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
return CreateDynamicObject(modelid, x, y, z, rx, ry, rz,-1, -1, -1, STREAM_CONSTANT + GetColSphereRadius(modelid));
}
View gist:ff0679a857ef49d357bf
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
View Vehicle Mapper
#include <a_samp>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#include <foreach>
// EDIT THESE DEFINES TO WHATEVER SUITS YOU
#define USE_SYNC true // respawns the vehicle after you hit the cancel/finish button so it syncs with the world, disable this if you're mapping on a hill and the vehicle accidentally drives down the hill.
#define MAX_VEHICLES_PER_PLAYER (50) // maximum amount of vehicles 1 player can spawn
#define LABEL_COLOR 0xFFFFFFFF // Vehicle's label color
@m0k1
m0k1 / untar.php
Created Apr 20, 2015
Untar php script
View untar.php
<?php
/**
* Simple script to extract files from a .tar archive
*
* @param string $file The .tar archive filepath
* @param string $dest [optional] The extraction destination filepath, defaults to "./"
* @return boolean Success or failure
*/
function untar($file, $dest = "./") {
@m0k1
m0k1 / testGM.pwn
Created Apr 24, 2015
Testing of YSI 4.0 Y_commands
View testGM.pwn
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS (1000)
#include <core>
#include <float>
#include <YSI\y_commands> // By Y_Less, 4.0: https://github.com/Misiur/YSI-Includes/
#include <YSI\y_master> // By Y_Less, 4.0: https://github.com/Misiur/YSI-Includes/
main()
{
@m0k1
m0k1 / check_id_exist.php
Created May 15, 2015
Check if ID exist in database
View check_id_exist.php
<?php
$mysql_server = "localhost";
$mysql_user = "username";
$mysql_password = "password";
$mysql_dbname = "db";
$mysqlcon = new mysqli($mysql_server, $mysql_user, $mysql_password, $mysql_dbname);
if ($mysqlcon->connect_error) {
die("Connection failed: " . $mysqlcon->connect_error);
}
@m0k1
m0k1 / xgoto.pwn
Created May 28, 2015
xgoto by m0k1
View xgoto.pwn
#include <sscanf2> // By Y_Less, 2.8.2: http://forum.sa-mp.com/showthread.php?t=570927
#include <YSI\y_commands> // By Y_Less, f4d85a8: http://forum.sa-mp.com/showthread.php?t=570884
#include <YSI\y_master> // By Y_Less, f4d85a8: http://forum.sa-mp.com/showthread.php?t=570884
YCMD:xgoto(playerid, params[], help)
{
new string[256], Float:x,Float:y,Float:z;
if(sscanf(params, "fff", x,y,z)) return SendClientMessage(playerid, -1, ""#SMCOLOR"[SM:CMD] {FFFF00}/xgoto [x] [y] [z]");
format(string, sizeof(string), ""#SMCOLOR"[SM] {FFFF00}Portovao si se do %f %f %f", x,y,z);
SendClientMessage(playerid, COLOR_LIGHTRED2, string);
@m0k1
m0k1 / main.cpp
Created Jun 24, 2015
Test sa-mp functions ingame. (main.cpp)
View main.cpp
#include <stdio.h>
#include <string.h>
using namespace std;
bool strEqual(char string[], char toComp[])
{
int len = strlen(toComp);
char oldchar = string[len];