Skip to content

Instantly share code, notes, and snippets.

View muhammadghazali's full-sized avatar

Muhammad Ghazali muhammadghazali

View GitHub Profile
@mikeal
mikeal / gist:9242748
Last active June 23, 2020 05:17
Response to Nodejitsu NPM Trademark

I've known people at nodejitsu for years, since before the company even existed. I still consider many of them friends. That said, somebody over there has lost their mind.

Trademarks are an important part of open source. They protect the integrity of the trust that is built by any project. A classic example of why this is the case is Firefox. Suppose that a malware producer takes the Firefox codebase, which is free and open source, packages up their malware with it and then releases it as "Firefox". Then they buy search advertising and suddenly their bad and malicious version of Firefox is the first result on search engines across the web. This is clearly a bad thing for Firefox and open source everywhere, but what can Mozilla do to protect their community of users?

They can't enforce a software license since the use is permitted under the Mozilla Public License. They can, however, enforce on these hypothetical bad actors using their trademark on the word "Fi

@Jxck
Jxck / ecma5_on_v8.js
Created July 9, 2011 12:02
The sample usage of ECMA 5 Features Implemented in V8
/**
* The sample usage of ECMA 5 Mozilla Features Implemented in V8
* https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8
* You can use thease new feature of ECMA5 on Node.js as you like.
* because there is no IE :)
* Order is deferent form original wiki.
* Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable)
*
* you can execute this file.
* $ node ecma5_on_v8.js
@kivi
kivi / collecttion-json-template-options.md
Created August 21, 2012 12:20 — forked from mrdevinmob/collecttion-json-template-options.md
collection-json extension template options

Template Options

Support template data options by adding property attribute with an array of text and values. Additionally add a multiple property, which indicates multiple values are suppored if set to "true".

  1. Add an optional property to the data object: options (array of objects. text/value pair)

    • the "text" property would indicate the text to be displayed in client.
    • the "value" property would indicate the value associated with the text above. This is the what the client should return to to the API in a POST or PUT request.
  2. Add an optional property to the data object: multiple (boolean).

@cocoahero
cocoahero / README.md
Created July 12, 2012 17:05
Android Auto-Versioning w/ Git

It is common practice to make the android:versionCode in the AndroidManifest.xml the build number of the application. An easy build number to calculate is the number of git commits in the repo.

Instead of having to edit the manifest file manually and update the android:versionCode attribute with the build number, below is a git pre-commit hook that does it for you.

#!/usr/bin/env bash

MANIFEST="AndroidManifest.xml"

if [ -f $MANIFEST ]
@macdonst
macdonst / tweets.js
Created December 21, 2011 19:50
Load Tweets
function loadTweets() {
var request = new XMLHttpRequest();
request.open("GET", "http://search.twitter.com/search.json?q=phonegap", true);
request.onreadystatechange = function() {//Call a function when the state changes.
if (request.readyState == 4) {
if (request.status == 200 || request.status == 0) {
var tweets = JSON.parse(request.responseText);
var data = "<table cellspacing='0'>";
var tableClass;
for (i = 0; i < tweets.results.length; i++) {