Skip to content

Instantly share code, notes, and snippets.

View shahril96's full-sized avatar
🐢

Mohd Shahril shahril96

🐢
View GitHub Profile
// this shit is written as part of my project with my friends, but that idea was demolished
// this actually will try to find .mp3 direct link file from 4shared audio download link
// im surprised that this still working after 2 years i wrote this script
// btw, here you are, enjoy :) (warning: code looks suck!)
<?php
$shared = new four_shared;
//echo $shared->search('linkin park');
print_r($shared->take_link('https://www.4shared.com/mp3/1ZCsTQJY/fadirul_-_suasana_hari_raya_co.html'));
@shahril96
shahril96 / php_encoder.php
Created February 3, 2015 17:32
Simple PHP Obfuscator
// this was my attempt to write my own php obfuscator
// this was inspired by Carbylamine PHP Script Encoder
// its currently in alpha, because sometimes its work, and sometimes it doesnt
// this was written 3 years ago (ahh memories again)
// so code looks suck
// thanks to Mokhdzani Faeq for created good regexs
// have fun!
<?php
@shahril96
shahril96 / arguments_analysis.asm
Created February 26, 2015 07:52
Analysis of assembly language output produced by C code that accepting string argument from Terminal perimeter
/*
#include <stdio.h>
int main(int argc, char *argv[])
{
puts(""); // space
if(argc == 1)
{
@shahril96
shahril96 / chess.cpp
Last active January 18, 2016 04:37
Naive coded chess program written as my mini project for second semester (not working inside Window$)
// if using OOP, this program is actually not so pain in the ass to write..
/* shahril : 18-jan-2016
piece of advises to those "forces" who want to read my code
- code very mess up (this was written 1 year ago)
- this game isn't "computer vs human", it's "human vs human", the reason is my internal implementation
isn't compatible with chess engines that available online
@shahril96
shahril96 / srtf.cpp
Last active December 5, 2020 04:33
Naive implementation of SRTF algorithm (Short Remaining TIme First) using C++
#include <iostream>
using namespace std;
int SIZE_STRUCT;
int choose_process(struct process Process[], int running[], int size_running);
int get_total_burst_time(struct process Process[]);
int check_if_exist(int running[], int size_running, int check);
void add_running_process(struct process Process[], int running[], int &size_running, int i);
@shahril96
shahril96 / configuration.js
Created April 26, 2015 05:21
My Aria2 WebUI Config
angular
.module('webui.services.configuration', [])
.constant('$name', 'Aria2 WebUI') // name used across the entire UI
.constant('$titlePattern', 'active: {active} - waiting: {waiting} - stopped: {stopped} — {name}')
.constant('$pageSize', 11) // number of downloads shown before pagination kicks in
.constant('$authconf', { // default authentication configuration, never fill it in case the webui is hosted in public IP as it can be compromised
host: 'localhost',
port: 6800,
encrypt: false,
auth: { // either add the token field or the user and pass field, not both.
#include <iostream>
#include <cmath>
#define MAXF 999999.0
#define EPSILON 0.0000000001
using namespace std;
int main()
{
#include <iostream>
#include <cctype>
using namespace std;
int validate_input(char input[])
{
char bool_zul[30] = {0}, *ptr = input;
while(*ptr)
@shahril96
shahril96 / strlen.asm
Created May 27, 2015 15:37
Assembly - Example of strlen using fully assembly, utilized scan string operation with repetition
; cara nk guna :
; first convert jadi obj file guna nasm -> nasm -f elf32 test.asm -F dwarf -g
; then kena guna linker, guna gcc mudah -> gcc test.o -o test -m32 -ggdb
; kemudian run ./test
section .text
global main ; must be declared for linker (ld)
section .data
msg db 'Hello, world!', 0xa, 0x0 ; our dear string
@shahril96
shahril96 / lcs.c
Created June 11, 2015 04:17
POC of Longest Common Sub-Sequence problem with complexity O(nm)
/* References :
http://www.geeksforgeeks.org/dynamic-programming-set-4-longest-common-subsequence/
https://www.ics.uci.edu/~eppstein/161/960229.html */
#include <stdio.h>
#include <string.h>
#define MAX(X,Y) ((X) > (Y)) ? (X) : (Y)
char str[100];