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
View put_all_scripts_at_end.php
<?php
header("Content-Type: text/plain; UTF-8");
//mock HTML
$content = "%3C!DOCTYPE%20html%3E%20%3Chtml%20lang%3D%22en-US%22%20class%3D%22no-js%22%3E%20%3Chead%3E%20%3Cmeta%20charset%3D%22UTF-8%22%3E%20%3Cmeta%20name%3D%22viewport%22%20content%3D%22width%3Ddevice-width%22%3E%20%3Clink%20rel%3D%22profile%22%20href%3D%22http%3A%2F%2Fgmpg.org%2Fxfn%2F11%22%3E%20%3Clink%20rel%3D%22pingback%22%20href%3D%22http%3A%2F%2Flocal.eladkarako.com%2Ficompile%2Fxmlrpc.php%22%3E%20%3C!--%5Bif%20lt%20IE%209%5D%3E%20%3Cscript%20\nsrc%3D%22http%3A%2F%2Flocal.eladkarako.com%2Ficompile%2Fwp-content%2Fthemes%2Ftwentyfifteen%2Fjs%2Fhtml5.js%22%3E%3C%2Fscript%3E%20%3C!%5Bendif%5D--%3E%20%3Cscript%3E\n(function(html)%7Bhtml.className%20%3D%20html.className.replace(%2F%5Cbno-js%5Cb%2F%2C'js')%7D)(document.documentElement)%3B%3C%2Fscript%3E%20%3Ctitle%3EiCompile%20(Local)%20%7C%20Just%20another%20WordPress%20site%3C%2Ftitle%3E%20%3Clink%20rel%3D%22alternate%22%20type%3D%22application%2Frss%2Bxml%22%20title%3D%22iCompile%20(Loca
@eladkarako
eladkarako / checking_gzip_like_a_boss.php
Created Mar 25, 2015
A Full Working Example On How To Check If A Content Is GZIP (With Deflate Compression-Method), The `is_gzip` Can Be Cut&&Paste To Your Code, This Is Example For My Answer At 'Http://Stackoverflow.Com/Questions/10975775/How-To-Determine-If-A-String-Was-Compressed'
View checking_gzip_like_a_boss.php
<?php
/*! @author http://icompile.eladkarako.com */
date_default_timezone_set("Asia/Jerusalem");
while (ob_get_level() > 0) ob_end_flush();
mb_language("uni");
@mb_internal_encoding('UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');
@eladkarako
eladkarako / bad_email_domain___disposable_email___spammers___temporary_email.txt
Created Mar 27, 2015
bad email domain - disposable email - spammers - temporary email
View bad_email_domain___disposable_email___spammers___temporary_email.txt
0-mail.com
0815.ru
0815.ru0clickemail.com
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
@eladkarako
eladkarako / mimetypes.txt
Created Apr 23, 2015
Long List Of MimeTypes (format is file extension \t mime type), list is sorted and unique (by column 1)
View mimetypes.txt
3dml text/vnd.in3d.3dml
3g2 video/3gpp2
3gp video/3gpp
aac audio/x-aac
aam application/x-authorware-map
aas application/x-authorware-seg
abw application/x-abiword
acc application/vnd.americandynamics.acc
ace application/x-ace-compressed
acu application/vnd.acucobol
@eladkarako
eladkarako / computer_programming_languages.txt
Created Apr 23, 2015
List Of Computer Programming Languages (From gist.github.com, in the given order, w/o the first one which is Text due to repeating later)
View computer_programming_languages.txt
ActionScript
C
C#
C++
Clojure
CoffeeScript
CSS
Go
Haskell
HTML
@eladkarako
eladkarako / window_performance_timing_enumerator.js
Created Apr 23, 2015
Enumerate window.performance.timing, but just the good part, from timing-object to generic object [JavaScript]
View window_performance_timing_enumerator.js
function get_performance_data() {
return (function (timing) {
timing = {};
["navigationStart", "unloadEventStart", "unloadEventEnd", "fetchStart", "domainLookupStart", "domainLookupEnd"
, "connectStart", "connectEnd", "secureConnectionStart", "requestStart"
, "responseStart", "responseEnd", "domLoading", "domInteractive", "domContentLoadedEventStart"
, "domContentLoadedEventEnd", "domComplete", "loadEventStart", "loadEventEnd"].forEach(function (item) {
timing[item] = performance.timing[item];
});
@eladkarako
eladkarako / quick_iframe_creator.html
Last active Aug 29, 2015
Loose Permission IFrame. Done quickly using 'with' structure and comma expression. Not a single VAR expression and a VERY clear code.
View quick_iframe_creator.html
<!-- using iframe with "allow-same-origin",
will require that the path of the iframe (if served from different domain) will also contain the .htaccess file, below:
(that will send the header '..Allow-Origin:*' along with the HTML or PHP file)
Options +FollowSymLinks
RewriteEngine on
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "*"
Header set Access-Control-Expose-Headers "*"
Header set Access-Control-Allow-Credentials "true"
View easy_unicode_binary_string_using_unescape_encodeURIComponent.js
/* don't use a loop to convert char-by-char,
unescape(encodeURIComponent(...)) generates letters < 255 (unicode2ascii)
decodeURIComponent(escape("...")) generates the value back (ascii2unicode)
*/
unescape(encodeURIComponent("א"))
//output: "א"
unescape(encodeURIComponent("א")).split('').forEach(function(c){ console.log(c.charCodeAt(0)) });
//output: 215
@eladkarako
eladkarako / all_css_properties.txt
Last active Aug 29, 2015
[http://icompile.eladkarako.com/all-css-properties/] All CSS Properties, including vendor-prefixes and future draft
View all_css_properties.txt
-apple-trailing-word
-epub-caption-side
-epub-hyphens
-epub-text-combine
-epub-text-emphasis
-epub-text-emphasis-color
-epub-text-emphasis-style
-epub-text-orientation
-epub-text-transform
-epub-word-break
@eladkarako
eladkarako / sf-helper-agent.js__original.js
Created Aug 13, 2015
http://savefrom.net/js/sf-helper-agent.js both original and translated. the "not minified" version.
View sf-helper-agent.js__original.js
/**
* SaveFrom helper agent
* @date 17.06.2015
* @version 1.5
*/
(function sfAddButton() {
"use strict";
if (!window.getComputedStyle) {
return;
}
You can’t perform that action at this time.