Skip to content

Instantly share code, notes, and snippets.

💭
☕︎

Elad Karako eladkarako

💭
☕︎
Block or report user

Report or block eladkarako

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eladkarako
eladkarako / enumerate_level_0_non-recursive_files_in_folder.js
Created Jul 30, 2019
NodeJS - Enumerate level-0 (non-recursive) files in folder, prepared for an argument input (not used)
View enumerate_level_0_non-recursive_files_in_folder.js
"use strict";
const FS = require("fs")
,PATH = require("path")
,RESOLVE = function(path){path = path.replace(/\\+/g,"/");
path = PATH.resolve(path);
path = path.replace(/\\+/g,"/");
path = path.replace(/\/\/+/g,"/");
path = path.replace(/\/+$/g,""); //remove last '/'
return path;
@eladkarako
eladkarako / document_ready.js
Created Jul 30, 2019
[JavaScript] document ready (plain method)
View document_ready.js
function document_ready(callback){
function completed(){
document.removeEventListener("DOMContentLoaded", completed, false);
self.removeEventListener("load", completed, false);
self.setTimeout(function(){ callback(); },10); //timeout helps to execute in a semi-async way.
}
if("loading" !== document.readyState){ //interactive or complete
completed();
return;
View PST2GB.txt
File: PST2GB.exe
P32Dasm v2.80
VB6 Application detected ... NCode
00409670: Private dlgDialog.lblQ245025_Click()
00409676: push __vbaExceptHandler
004096DA: call __vbaHresultCheckObj
004096E0: mov esi, __vbaStrToAnsi
@eladkarako
eladkarako / WMIDiag.vbs
Created Jul 23, 2019
WMIDiag.vbs - The WMI Diagnosis Utility
View WMIDiag.vbs
This file has been truncated, but you can view the full file.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
' OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
' FITNESS FOR A PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved
'
' This script is not supported under any Microsoft standard support program or service.
' The script is provided AS IS without warranty of any kind. Microsoft further disclaims all
' implied warranties including, without limitation, any implied warranties of merchantability
View my_ip.php
<?php
while (ob_get_level() > 0) ob_end_flush();
date_default_timezone_set("Asia/Jerusalem");
mb_language("uni");
mb_internal_encoding('UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');
header('Charset: UTF-8', true);
header('Content-Encoding: UTF-8');
View linkwithin_widget_pretty.js
//15:31 יום שני 01 אוקטובר 2012
if (typeof (linkwithin_is_running) === 'undefined') {
linkwithin_is_running = true;
oLinkWithin = {
v: 35,
hs: [],
ts: [],
ps: [],
ws: [],
View checking if tab exists.js
"use strict";
var API = chrome || browser;
function tab_exists (tab_id, callback_exists, callback_not_exists) { //walk all tabs (in all windows), execute callback if it finds a tab with a given ID, and execute a callback (optional) if it didn't find one.
if("function" !== typeof callback_exists) throw new Error('please provide second argument - function that will be called when a tab-id will match one of the existing tabs.');
on_not_exists = ("function" === typeof on_not_exists) ? on_not_exists : function(){return true;}; //normalize optional 'on_not_exist' callback
function tabs_walker(windows){
var i,window,j,tab;
@eladkarako
eladkarako / write HTML on-to SVG on-to CANVAS and save it as an image.js
Created Jul 20, 2019
write HTML on-to SVG on-to CANVAS and save it as an image
View write HTML on-to SVG on-to CANVAS and save it as an image.js
function multiline(s){return s.toString().replace(/\r/g,"##R##").replace(/\n/g,"##N##").replace(/^.*\/\*\+(.*)\+\*\/.*$/, "$1").replace(/##R##/g,"\r").replace(/##N##/g,"\n");}
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var data = multiline(function(){/*+
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">
<em>I</em> like <span style="color:white; text-shadow:0 0 2px blue;">cheese</span>
</div>
@eladkarako
eladkarako / Winner🏆 Winner🏆, Chicken 🐔 Dinner🍗.md
Last active Jul 20, 2019
Winner🏆 Winner🏆, Chicken 🐔 Dinner🍗
View Winner🏆 Winner🏆, Chicken 🐔 Dinner🍗.md

Winner 🏆 Winner 🏆, Chicken 🐔 Dinner 🍗

Winner 🏆️ Winner 🏆️, Chicken 🐔️ Dinner 🍗️

Winner 🏆︎ Winner 🏆︎, Chicken 🐔︎ Dinner 🍗︎

You can’t perform that action at this time.