Skip to content

Instantly share code, notes, and snippets.

🙌

Fatih Acet fatihacet

🙌
Block or report user

Report or block fatihacet

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
@fatihacet
fatihacet / sample.json
Created Dec 9, 2012
Sample array of object json
View sample.json
[
{
"id": 1,
"body": "First Item",
"severity": 1,
"status": 0
},
{
"id": 2,
"body": "Second Item",
@fatihacet
fatihacet / ie-virtual-machines.txt
Created Nov 20, 2012
Windows Virtual PC VHDs for testing websites with different Internet Explorer versions
View ie-virtual-machines.txt
http://www.microsoft.com/en-us/download/details.aspx?id=11575
@fatihacet
fatihacet / numberPaste.js
Created Nov 15, 2012
Allow pasting only numbers
View numberPaste.js
$('#securityCode').bind('paste', function() {
var el = this;
setTimeout(function() {
el.value = el.value.replace(/\D/g, '');
}, 0);
});
@fatihacet
fatihacet / gist:4000605
Created Nov 2, 2012
Divide string into parts
View gist:4000605
var arr = "123456789012341".match(/.{3,4}/g);
console.log(arr); // ["1234", "5678", "9012", "341"]
@fatihacet
fatihacet / fire-rainbow.css
Created Oct 22, 2012
Color scheme for fire rainbow addon.
View fire-rainbow.css
.panelNode-script { background-color: #EFEFE7; color: black; cursor: default; font-family: Monaco,Monospace,Courier New !important; font-size: 12px; }
.sourceRow.hovered { background-color: #EEEEEE; }
.sourceLine { background: none no-repeat scroll 2px 0 #EEEEEE; border-bottom: 1px solid #EEEEEE; border-right: 1px solid #CCCCCC; color: #888888; }
.sourceLine:hover { text-decoration: none; }
.scriptTooltip { background: none repeat scroll 0 0 LightYellow; border: 1px solid #CBE087; color: #000000; }
.sourceRow[exeline="true"] { background-color: lightgoldenrodyellow; outline: 1px solid #D9D9B6; }
.js-comment { color: gray; font-size: 11px; }
.whitespace { color: blue; }
.js-variable { color: #7C3A99; font-size: 11px; }
.js-punctuation { color: black; font-size: 11px; }
@fatihacet
fatihacet / compressed.sh
Created Oct 11, 2012
Compressing all css files into one file with YUI Compressor.
View compressed.sh
#!/bin/sh
#usage : ./scripts/minify.sh
echo "Deleting old content of compressed file..."
echo "" > css/compressed/all.css
echo "Combining all css files into one.."
cat \
css/reset.css \
View numberonly.js
numericField = function (elementId) {
var allowed = [0, 8];
for (var i = 48; i < 58; i++) {
allowed.push(i);
}
$("#" + elementId).keypress(function(e){
if (!(allowed.indexOf(e.which) >= 0)) {
e.preventDefault();
@fatihacet
fatihacet / entity-lookup.txt
Created Sep 13, 2012
HTML Entity Chars Lookup Page
View entity-lookup.txt
http://llizard.etherwork.net/cwc/charactmap.html
View sticky-footer.html
@fatihacet
fatihacet / history.js
Created Aug 29, 2012
Implementing history navigate in Google Closure Library
View history.js
var history = new goog.History(false, '', document.getElementById('history_input'));
goog.events.listen(history, goog.history.EventType.NAVIGATE, function() {
console.log(history.getToken());
});
history.setEnabled(true);
You can’t perform that action at this time.