Skip to content

Instantly share code, notes, and snippets.

View ayhansipahi's full-sized avatar
👾
Coding...

Ayhan Sipahi ayhansipahi

👾
Coding...
View GitHub Profile
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
curl https://npmjs.org/install.sh | sudo sh
#!/bin/sh
sudo aptitude install nodejs
sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100
curl https://www.npmjs.org/install.sh | sudo sh
@ayhansipahi
ayhansipahi / nodejs install
Created October 2, 2014 08:14
node install
wget -qO ~/node.tar.gz http://nodejs.org/dist/v0.10.32/node-v0.10.32.tar.gz
tar xf ~/node.tar.gz && cd ~/node-v0.10.32
./configure --prefix=$HOME
make && make install && cd
rm -rf ~/node{-v0.10.32,.tar.gz}
$(function(){window.top!==window.self&&parent.$.colorbox.resize({width:$(document).width(),height:$(document).height()})});
var sendgroup = $(".sendgroup:checked").map(function(){
return $(this).val();
}).get();
$(function() {
if (window.Modernizr) {
if (!Modernizr.input.placeholder) {
$("[placeholder]").focus(function() {
var input;
input = $(this);
if (input.val() === input.attr("placeholder")) {
input.val("");
return input.removeClass("placeholder");
}
@ayhansipahi
ayhansipahi / nocache.htaccess
Created November 4, 2013 07:45
htaccess no cache
<filesMatch "\.(html|htm|js|css|jpg|png|jpeg|gif)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
@ayhansipahi
ayhansipahi / google translate
Created September 12, 2013 14:10
google translate widget
<div id="google_translate_element"></div>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
autoDisplay: false,
gaTrack: true,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
@ayhansipahi
ayhansipahi / zamanlı uyarı
Created July 10, 2013 14:14
zaman ayarlı uyarı
var tmpTime= new Date().getTime();
var tmpid ="result_not_found"+tmpTime;
var noResult ='<div id="'+tmpid+'" class="alert alert-error"><button type="button" class="close" data-dismiss="alert">&times;</button>Sorry,no result found!</div>';
$("#content").prepend(noResult);
setTimeout(function(){$("#"+tmpid).fadeOut()},3000);