Skip to content

Instantly share code, notes, and snippets.

View iSWORD's full-sized avatar
🌙

Muha Ajjan iSWORD

🌙
View GitHub Profile
@iSWORD
iSWORD / template.asm
Last active August 22, 2025 03:38
AVR Assembly Template
.INCLUDE "m8def.inc"
;====================================================================
;
; AVR assembly template
;
; Author: Muhannad Ajjan
; Created: Tue Dec 8 2015
; Processor: ATmega8
; Frequency: 1 MHz
@iSWORD
iSWORD / dabblet.css
Created January 25, 2013 22:08
Untitled
div:not(#container){
background: rgb(127,125,224);
text-align: center;
width: 46px;
height: 46px;
margin: 2px;
font: 26px Helvetica;;
}
#container{
@iSWORD
iSWORD / html+inline js
Created October 30, 2012 13:31
HTML+JS Mega-min special char escaper
<textarea style="display:block" cols=42 rows=10 onkeyup="t=this;t.nextElementSibling.value=t.value.replace(/</g,'&amp;lt;').replace(/>/g,'&amp;gt;')"></textarea>
<textarea readonly onclick="t=this;t.focus();t.select();"></textarea>
@iSWORD
iSWORD / html+inline js
Created October 30, 2012 13:30
HTML+JS Cross-browser editable select tag
<select name="project" onchange="t=this;n=t.nextElementSibling;if(t.value=='new')if(confirm('Add new '+t.name+'?')){n.style.display='inline-block'; n.name=t.name; t.name=''; t.style.display='none'; n.focus()}">
<option value="new"><new project></option>
<option selected>Project1</option>
<option>Project2</option>
<option>Project3</option>
</select>
<input style="display:none">
@iSWORD
iSWORD / html+inline js
Created October 30, 2012 13:30
HTML+JS Chrome editable select element
<style>
.select-editable { position:relative; background-color:white; border:solid grey 1px; width:120px; height:18px; }
.select-editable select { position:absolute; top:0px; left:0px; font-size:14px; border:none; width:120px; margin:0; }
.select-editable input { position:absolute; top:0px; left:0px; width:100px; padding:1px; font-size:12px; border:none; }
.select-editable select:focus, .select-editable input:focus { outline:none; }
</style>
<div class="select-editable">
<select tabindex="-1" onchange="this.nextElementSibling.value=this.value">
<option value=""></option>
@iSWORD
iSWORD / css
Created October 30, 2012 13:22
HTML+JS Supa-Cool Progbar
#o{
width: 200px;
height: 20px;
box-shadow: 0 0 1px gray;
}
#i{
background: -webkit-repeating-linear-gradient(-45deg, rgba(157,213,58,1) 0,rgba(161,213,79,1) 15,rgba(128,194,23,1) 16,rgba(124,188,10,1) 30);
height: 20px;
}