Skip to content

Instantly share code, notes, and snippets.

View mustafakibar's full-sized avatar
:octocat:
kibar

kibar mustafakibar

:octocat:
kibar
View GitHub Profile
#!/system/bin/sh
#
# VALUES (_id,name,numeric,mcc,mnc,apn,user,server,password,proxy,port,mmsproxy,mmsport,mmsc,current)
#
SQLITE="/system/bin/sqlite3"
DB="/data/data/com.google.android.providers.telephony/databases/telephony.db"
# Telecom New Zealand
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
@seanh
seanh / ConcreteObservable.java
Created March 13, 2009 19:26
Observer design pattern in java
package observer;
import java.util.Set;
import java.util.HashSet;
public class ConcreteObservable<T> implements Observable<T> {
private Set<Observer<T>> observers = new HashSet<Observer<T>>();
public void addObserver(Observer o) {
@mathiasbynens
mathiasbynens / change-favicon.js
Created June 7, 2010 12:41
Dynamically changing favicons with JavaScript
/*!
* Dynamically changing favicons with JavaScript
* Works in all A-grade browsers except Safari and Internet Explorer
* Demo: http://mathiasbynens.be/demo/dynamic-favicons
*/
// HTML5™, baby! http://mathiasbynens.be/notes/document-head
document.head || (document.head = document.getElementsByTagName('head')[0]);
function changeFavicon(src) {
@michaelklishin
michaelklishin / per_queue_message_ttl.rb
Created July 29, 2011 04:20
An example of using per-queue message time-to-live feature of RabbitMQ with amqp gem 0.8.0
require 'amqp'
require "amqp/extensions/rabbitmq"
AMQP.start do |connection|
puts "Connected!"
channel = AMQP::Channel.new(connection)
channel.on_error do |ch, channel_close|
puts "Oops! a channel-level exception: #{channel_close.reply_text}"
end
@luizfonseca
luizfonseca / ButtonAction.java
Created December 23, 2011 15:31
Simple Java Clock app for testing the Observer pattern.
// PACKAGE GOES HERE <--------
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ButtonAction implements ActionListener {
private Clock clock = new Clock();
@Override
public void actionPerformed(ActionEvent e) {
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

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.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)