Skip to content

Instantly share code, notes, and snippets.

Hasan Tayyar BEŞİK hasantayyar

Block or report user

Report or block hasantayyar

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
View dynamodb.md

Important note : Use " -sharedDb " flag whilde starting local dynamodb. otherwise js will use a different profile. And you can't access your tables what created from via cli or other platforms

$ wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.zip
$ unzip ...
....
$ sudo pip install awscli
$ ./DynamoDbLocal.jar --port 8787
@csanz
csanz / MostUsedCommands.md
Created Dec 31, 2011
Most used commands
View MostUsedCommands.md

history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r

         288 git
          29 heroku
          28 bin/runserver
          24 cd
          23 node
          13 ll
          11 vi
          10 open
@ajdavis
ajdavis / connection_test.py
Created Mar 27, 2012
Testing connection behavior in PyMongo
View connection_test.py
import os
import shutil
import threading
import sys
import time
import pymongo
import re
# Two steps: 1. run the test. 2. parse the log.
@hasantayyar
hasantayyar / countembeded.js
Created Mar 27, 2012
mongodb count embeded objects by an atrribute
View countembeded.js
var map = function() { emit(this.e, { notifications : this.notifications});};
var reduce = function(key, values) {
var count = 0;
values.forEach(function(docs) {
for(var doc in docs.notifications){
if(docs.notifications[doc].date>1332836355){
count+=1;
}
}
@hasantayyar
hasantayyar / disposablemails.php
Created Apr 17, 2012
my disposable email list to prevent abusing
View disposablemails.php
<?php
// has also some orther sites that is not a disposable mail service
$disposalbe = array(
'veryrealemail.com', // mirror of mailinator
'rtrtr.com',
'bobmail.info',
'tradermail.info', // mirror of mailinator
'omurtlak.com',
'mp3dinleq.com', // top spammer
@csanz
csanz / slideshow.js
Created Apr 24, 2012
intro to node.js slide show app written in node.js
View slideshow.js
var color = require('colors');
var stdin = process.openStdin()
, slides = {
1: "\tNode.js" +
"\n\n\t\tJavascript running on the server" +
"\n\n\t\tWritten in C++ (POSIX)" +
"\n\n\t\tWraps V8 JS VM (Google/Chrome)"
, 2: "\tOthers / Evented I/O" +
"\n\n\t\t > Reactor Pattern" +
"\n\n\t\t > EventMachine(Ruby) / Twisted (Python)" +
View MostUsedCommands.sh
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r
@hasantayyar
hasantayyar / mongo-weekly-maintenance.js
Created Jun 10, 2012
mongodb weekly maintenance script - compact
View mongo-weekly-maintenance.js
// compact all collections
db.getCollectionNames().forEach( function(c){ db[c].runCommand("compact"); } )
View blogla.html
<a title="blogla" style="text-decoration:none;border:0" href="javascript: void((function () {var el=document.getElementById('_blogcu_genel');if(el!=null){el.parentNode.removeChild(el);}var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src', 'http://www.blogcu.com/bookmarklet/bookmarklet.js?'+Math.floor(Math.random()*999999));document.body.appendChild(e)})());"><img style="border:0" src="http://static.blogcu.com/images/v2/blogla-plugin.png" alt="blogla" /></a>
@hasantayyar
hasantayyar / README.md
Created Aug 28, 2012
uptime monitor with appscript
View README.md
  • At first run allow gmail access.
  • Add time driven triggers (hour/minute)
You can’t perform that action at this time.