Skip to content

Instantly share code, notes, and snippets.

View core-hacked's full-sized avatar
:shipit:

core core-hacked

:shipit:
View GitHub Profile
@core-hacked
core-hacked / int_to_roman.php
Created July 13, 2022 13:01
Simple integer to roman conversion in PHP
<?php
class Solution {
/**
* @param String $s
* @return Integer
*/
function romanToInt($s) {
$map = [
@core-hacked
core-hacked / GetOrSetCookies.js
Created April 1, 2022 10:39
Simple cookie setter/getter for js
// get cookie by name
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
@core-hacked
core-hacked / messageboxwin.cpp
Created November 24, 2021 18:03
C++ kind of user friendly simple message box caller for windows...
#include <windows.h>
int main() {
/*
usage example:
MsgBox("Your title", "Your description", "the type of icon", "the-buttons");
Available options:
Type: warn, info, question, error