Skip to content

Instantly share code, notes, and snippets.

View maman's full-sized avatar
🔥

Achmad Mahardi maman

🔥
View GitHub Profile
@maman
maman / chartwiz.php
Created November 23, 2010 03:53
the chart wizard
<!DOCTYPE HTML>
<html>
<head>
<title>Chart Generator Wizard</title>
<!--<script src="js/jquery-1.4.2.js"></script>-->
<script src="js/jquery.scrollable.js"></script>
<script>
$(document).ready(function(){
$(".scrollable").scrollable();
})
EDIT: #1: The iwlwifi wifi drivers for both 4965 and 3945 are now in the mainstream kernel, as of 2.6.23, which is now available in Sid. Just install it, and you shouldn't need to do anything else thats described here.
#2: I finally decided to update the top part of this, using information thats from all of the subsequent posts. Although, I would still recommend you read all of the other posts, because I haven't been fiddling with this driver for a couple months, and other people are more knowledgable about this than me.
This howto is to try and get Intel 4965 wifi cards, found in the Santa Rosa chipset, working. Since the iwlwifi driver is not yet in the Debian repositories, to get it to work requires you to download that and compile it yourself. There are a couple of deviations from the normal "Make" "Make install" process to get it to work properly, so here they are.
@maman
maman / inbox.py
Created May 26, 2011 12:31
Samurize python & ruby notification
import imaplib, re
conn = imaplib.IMAP4_SSL("imap.gmail.com", 993)
conn.login("#yourusername@gmail.com#", "#yourpassword#")
unreadCount = re.search("UNSEEN (\d+)", conn.status("INBOX", "(UNSEEN)")[1][0]).group(1)
if unreadCount == "0":
unreadCount = "No"
print unreadCount + " New Mail"
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@maman
maman / index.html
Created January 30, 2012 03:29
Source of http://mwo.nanomites.us and http://kon.tl/mwo - both synced
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Ma Chung Web Olympiad 2012</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="nagging-menu.js"></script>
<script type="text/javascript">
//Disqus Setup
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 13, 2024 02:39
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@tentacode
tentacode / list.html.twig
Created October 15, 2012 12:23
Twig recursive macro
{% macro recursiveCategory(category) %}
<li>
<h4><a href="{{ path(category.route, category.routeParams) }}">{{ category }}</a></h4>
{% if category.children|length %}
<ul>
{% for child in category.children %}
{{ _self.recursiveCategory(child) }}
{% endfor %}
</ul>
@willurd
willurd / web-servers.md
Last active July 8, 2024 16:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@cou929
cou929 / detect-private-browsing.js
Last active May 1, 2024 21:07
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication