Skip to content

Instantly share code, notes, and snippets.

View hmert's full-sized avatar
🎃
fintech

Hüseyin Mert hmert

🎃
fintech
View GitHub Profile
@javajack
javajack / jquery.gdocsviewer.js
Created December 10, 2013 19:18
A JQuery Plugin for Google Doc Viewer Iframe Embeding http://jsfiddle.net/javajack/4s8bn/embedded/result/
/*
* jQuery.gdocViewer - Embed linked documents using Google Docs Viewer
* Licensed under MIT license.
* Date: 2011/01/16
*
* @author Jawish Hameed
* @version 1.0
*/
(function($){
$.fn.gdocsViewer = function(options) {
@bjori
bjori / profile.example.php
Created September 16, 2013 21:07
The MongoDB Profiling example, using the PHP Stream Notification API For more info, see: http://bjori.blogspot.com/2013/09/query-logging-and-profiling-in-mongodb.html
<?php
class MongoNotifications {
public $reqs = array();
/* Our callback function
* The prototype is define by the PHP Stream Notification system: http://php.net/stream_notification_callback
*/
function update($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) {
switch($notification_code) {
@mbostock
mbostock / .block
Last active August 29, 2023 06:47
Hexagon Mesh
license: gpl-3.0
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@robertlmullen74
robertlmullen74 / nodejs-dns-vs-ip-lookup-test.js
Created October 4, 2012 15:31
Node.js tester of dns lookup vs ip using the dns module
// This gist is helpful in determining if the dns resolution is the bottleneck when making
// outbound http request
var dns, http, util;
util = require('util');
dns = require('dns');
function outputMs()
{
var d = new Date();
var n = d.getUTCMilliseconds();
@paulmillr
paulmillr / active.md
Last active August 24, 2026 23:55
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@robertlmullen74
robertlmullen74 / load.js
Created March 19, 2012 15:23 — forked from mbrevoort/load.js
Simple ab style load generator
// requires request, measured, optimist and microtime npm modules
var util = require('util')
, request = require('request')
, microtime = require('microtime')
, measured = require('measured')
, collection = new measured.Collection('http')
, argv = require('optimist').usage('node load.js -c [concurrent] -n [total] url').argv;
var c = argv.c || 1
, n = argv.n || 1, uri = argv._[0]
@mbadolato
mbadolato / build.xml
Created January 20, 2012 18:34
Jenkins build.xml file for Symfony 2 projects
<?xml version="1.0" encoding="UTF-8"?>
<project name="YOUR_PROJECT_NAME" default="build" basedir=".">
<property name="source" value="src"/>
<property name="ignore" value="build"/>
<target name="clean"
description="Clean up and create artifact directories">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/code-browser"/>
@voidfiles
voidfiles / actionQueue.html
Created December 10, 2011 19:24
actionQueue in practice
<!DOCTYPE html>
<html>
<head>
<title>Like Button</title>
<!-- just getting this stuff out of the way -->
<style type="text/css" media="screen">
body {width: 750px;margin: 0 auto;}
p { margin: 10px 0 5px 0;}
.like-button{padding:5px 10px 5px 5px;border-radius:3px;background-color:#eee;color:#000;text-decoration:none;}
.like-button .star{text-shadow:magenta 1px 1px,magenta 2px 2px,magenta 3px 3px;}
@phpdude
phpdude / nginx.conf
Last active October 6, 2024 19:22
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;