Skip to content

Instantly share code, notes, and snippets.

View Jalalhejazi's full-sized avatar
💭
Automation | Teaching | Inspiring | Sharing

Jalal Hejazi Jalalhejazi

💭
Automation | Teaching | Inspiring | Sharing
  • Demant Enterprise
  • Denmark
View GitHub Profile
@Jalalhejazi
Jalalhejazi / YQL json
Last active January 15, 2016 19:10 — forked from ydn/gist:320165
JSON: YQL CONVERT TO JSON FORMAT
<!-- Use YQL to convert XML to JSON in your sleep -->
<!-- Introduced in YDN blog post: http://developer.yahoo.net/blog/archives/2010/03/yql_code_samples_yql_is_easy_to_use.html -->
<script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script>
<ul>UN Headlines:</ul>
<script>
var Y = new YUI();
function handleResponse ( json ) {
var items = json.query.results.item;
for ( var i = 0; i < items.length; i++ ) {
@Jalalhejazi
Jalalhejazi / gist:5279072
Created March 31, 2013 01:10
CSS3: Blue Button only using colors
/**
* blue css3 button
*/
body {height: 400px;padding:30px; font-family: Arial, Helvetica, sans-serif; font-size:13px;background: -webkit-radial-gradient(34% 60%,#2A2A2A,#030303);
background: -moz-radial-gradient(34% 60%,#2A2A2A,#030303);
background: -ms-radial-gradient(34% 60%,#2A2A2A,#030303);
background: -o-radial-gradient(34% 60%,#2A2A2A,#030303);
@Jalalhejazi
Jalalhejazi / Module1.js
Created March 31, 2013 01:13 — forked from fatihacet/Module1.js
JavaScript: module loading for seperate pages
var Module1 = function() {
this.message = 'Hello World from Module1';
this.init();
};
Module1.prototype.init = function() {
console.log(this.message);
};
@Jalalhejazi
Jalalhejazi / index.html
Created April 1, 2013 19:40
JavaScript: msgNotify.[info][warning][success][error][bookmark]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>msgNotify examples</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"/>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet"/>
<link href="msgNotify.css" rel="stylesheet" type="text/css" />
<style>
@Jalalhejazi
Jalalhejazi / JavaScript.sublime-build
Created April 3, 2013 11:58
Sublime Text: JavaScript Build-system using Nodejs
{
"cmd": ["node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "*.js"
}
@Jalalhejazi
Jalalhejazi / launch_sublime_from_terminal.markdown
Created April 3, 2013 12:08 — forked from artero/launch_sublime_from_terminal.markdown
Sublime Text: Launch Sublime from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@Jalalhejazi
Jalalhejazi / application.css
Last active January 15, 2016 19:10
CSS: Nice Scalable Fluid Text formatting
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
@Jalalhejazi
Jalalhejazi / jQueryLatestVersion.html
Created April 9, 2013 12:10
jQuery Latest version
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
@Jalalhejazi
Jalalhejazi / icons.css
Created April 10, 2013 16:28
CSS3: Monochrome Icon Set
body {
padding: 0;
margin: 0;
/*background: url(http://i.imgur.com/etE9K.png);*/
}
h1 {
font: 700 40px / 25px "Calibri";
text-align: center;
color: #333;
@Jalalhejazi
Jalalhejazi / program.js
Created April 10, 2013 16:39
JavaScript: getCityFromZipCode oiorest/postnummer
function getCityFromZipCode(sZipcodeSelector, sTargetSelector) {
var sLoadingClass = 'loading';
var $sTargetSelector = jQuery(sTargetSelector);
var $sZipcodeSelector = jQuery(sZipcodeSelector);
$sTargetSelector.html("");
if ($sTargetSelector.length > 0 && $sZipcodeSelector.length > 0 ) {
var sZipCode = $sZipcodeSelector.val();