Skip to content

Instantly share code, notes, and snippets.

View lieldulev's full-sized avatar
🏠
Working from home

Liel Dulev lieldulev

🏠
Working from home
View GitHub Profile
<?php
$session_vars_to_return = array('HTTP_ACCEPT', 'HTTP_ACCEPT_CHARSET','HTTP_ACCEPT_ENCODING','HTTP_ACCEPT_LANGUAGE','HTTP_CONNECTION','HTTP_USER_AGENT','HTTP_X_FORWARDED_FOR','HTTP_COOKIE','HTTP_REFERER');
foreach($session_vars_to_return as $session_var){
if (isset($_SERVER[$session_var])){
echo '<b class="var">'.$session_var.'</b>:'.$_SERVER[$session_var].'<br/>';
}
}
?>
@lieldulev
lieldulev / readme.md
Created June 1, 2012 03:48
Markdown syntax explained in one file

Markdown Syntax


Is easy to learn and simple to implement

Leave empty line for a new paragraph.

Consecutive lines of text will continue by default, and they will be wrapped

@lieldulev
lieldulev / imageFromText.js
Created August 30, 2012 23:33
A javascript function to get an filler image (data url) for any text
// @param [string] text - required. Text to render.
// @param [string] width - required. Image height.
// @param [string] height - required. Image width.
// @param [string] bgcolor - optional. Background color. Default dark grey.
// @param [string] fgcolor - optional. Text color. Default white.
// @param [string] shadow - optional. Shadow color. Default is no shadow.
function imageFromText(text, width, height, bgcolor, fgcolor, shadow)
{
var canvas = document.createElement('canvas');
canvas.width = width;
@lieldulev
lieldulev / gist:3738681
Created September 17, 2012 17:37
HLS with videojs
<!doctype html>
<html>
<head>
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
<video id="my_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
/*
imagesQueue.js FULL SOURCE
A simple, cross-browser, *parallel* images loader object.
imagesQ={
onComplete: function(){} // Fires when all finished loading
,onLoaded: function(){} // Fires when an image finishes loading
,current: null // Last loaded image (Image Object)
,qLength : 0 // the queue length before process_queue
,images: [] // Loaded images (array of Image Object)
@lieldulev
lieldulev / ghi-create-label-on-all-repos
Last active February 4, 2016 22:34
Create a Github-Issues' Label in all repos of an Organization using ghi
#!/bin/bash
# Dependencies
# - curl
# - sed
# - ghi (https://github.com/stephencelis/ghi)
if [ "$#" -ne 5 ];
then
echo ""
@lieldulev
lieldulev / cpt4.csv
Created May 3, 2018 17:36
CPT 4 Codes, CSV format
com.medigy.persist.reference.type.clincial.CPT.code label
0003T Cervicography
0008T Upper gi endoscopy w/suture
0010T Tb test, gamma interferon
0016T Thermotx choroid vasc lesion
0017T Photocoagulat macular drusen
0018T Transcranial magnetic stimul
0019T Extracorp shock wave tx, ms
0020T Extracorp shock wave tx, ft
0021T Fetal oximetry, trnsvag/cerv
@lieldulev
lieldulev / hideZehutFacebookComments.js
Created March 13, 2019 05:03
Hide Zehut Related Comments on Facebook להסתיר תגובות על זהות בפייבסוק
// Copy paste into your chrome console to periodically hide any comments containing זהות.
setInterval(()=>{Array(...document.getElementsByTagName('span')).filter(c=>c.textContent.includes('זהות')).forEach(c=>{c.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.style.display = 'none';});}, 500);
@lieldulev
lieldulev / TrueType.ts
Created January 26, 2021 19:24 — forked from smhanov/OpenType.ts
Here is my implementation of a TrueType font reader in Typescript. You can read a font directly from an ArrayBuffer, and then call drawText() to draw it. See my article http://stevehanov.ca/blog/index.php?id=143
// By Steve Hanov
// [email protected]
// Released to the public domain on April 18, 2020
//import { log } from "./log"
// Usage:
/*
declare let arrayBuffer:ArrayBuffer;