Dark Wallet May Make Bitcoin Even Harder to Trace

Bitcoins FTW!

Bitcoin

By Jill Scharr

Credit: Defense Distributed/YouTube

Credit: Defense Distributed/YouTube

The digital cryptocurrency Bitcoin already has a lot of built-in security and privacy features. But thanks to a Bitcoin storage app called Dark Wallet scheduled to be released tomorrow (May 1), Bitcoin may become even more difficult to trace. Dark Wallet’s creators have said they created the software to help criminals disguise their activities online.

Dark Wallet is developed by a group called unSystem whose members include Cody Wilson, creator of the world’s first 3D-printed gun, the Liberator. Both projects share similar political goals: to thwart any and all government regulations.

Bitcoin is not inherently illegal or malicious, though it’s often the currency of choice for criminals because it operates independently of any government and is difficult to trace. But Dark Wallet’s creators say their app was created with criminals in mind.

“It’s just money-laundering software,” Wilson said at a debate at the New York Museum of Modern Art.

The…

View original post 44 more words

Advertisements

Introducing A New Optional Feature Called Nearby Friends

Facebook for Mobile: Got a new facelift

Facebook Newsroom

By Andrea Vaccari, Product Manager

Today we are beginning to roll out a new feature called Nearby Friends that you can choose to turn on. Nearby Friends helps you discover which friends are nearby or on the go.

If you turn on Nearby Friends, you’ll occasionally be notified when friends are nearby, so you can get in touch with them and meet up. For example, when you’re headed to the movies, Nearby Friends will let you know if friends are nearby so you can see the movie together or meet up afterward.

Nearby Friends 1

Nearby Friends is an optional feature. You can choose who can see if you’re nearby (for example: your friends, close friends, or a specific friends list) and you can turn it on and off at any time.

Nearby Friends 2

Sharing your location with Nearby Friends goes two ways — you and your friends both have to turn on Nearby Friends…

View original post 222 more words

Node.js MVC: Express.js + Derby Hello World Tutorial

Node MVC Framework

Express.js is a popular node frameworks which uses middleware concept to enhance functionality of applications. Derby is a new sophisticated Model View Controller (MVC) framework which is designed to be used with Express as it’s middleware. Derby also comes with the support of Racer, data synchronization engine, and Handlebars-like template engine among many other features.

Derby Installation

Let’s set up a basic Derby application architecture without the use of scaffolding. Usually project generators are confusing when people just start to learn a new comprehensive framework. This is a bare minimum “Hello World” application tutorial that still illustrates Derby skeleton and demonstrates live-templates with websockets.

Of course we’ll need Node.js and NPM which can be obtained at nodejs.org. To install derby globally run:

$ npm install -g derby

To check the installation:

$ derby -V

My version as of April 2013 is 0.3.15. We should be good to go to creating our first app!

File Structure

This is the project folder structure:

project/
  -package.json
  -index.js
  -derby-app.js
  views/
    derby-app.html
  styles/
    derby-app.less

Dependencies

Let’s include dependencies and other basic information in package.json file:

 {
  "name": "DerbyTutorial",
  "description": "",
  "version": "0.0.0",
  "main": "./server.js",
  "dependencies": {
    "derby": "*",
    "express": "3.x"
  },
  "private": true
}

Now we can run npm install which will download our dependencies intonode_modules folder.

Views

Views must be in views folder and they must be either in index.html under a folder which has the same name as your derby app JavaScript file, i.e.,views/derby-app/index.html, or be inside of a file which has the same name as your derby app JS file, i.e., derby-app.html.

In this example “Hello World” app we’ll use <Body:> template and {message}variable. Derby uses mustach-handlebars-like syntax for reactive binding.index.html looks like this:

<Body:>
  <input value="{message}"><h1>{message}</h1>

Same thing with Stylus/LESS files, in our example index.css has just one line:

h1 {
  color: blue;
}

To find out more about those wonderful CSS preprocessors check out documentation at Stylus and LESS.

Main Server

index.js is our main server file, and we begin it with an inclusion of dependencies with require() function:

var http = require('http'),
  express = require('express'),
  derby = require('derby'),
  derbyApp = require('./derby-app');

Last line is our derby application file derby-app.js.

Now we’re creating Express.js application (v3.x has significant differences between 2.x) and an HTTP server:

var expressApp = new express(),
  server = http.createServer(expressApp);

Derby uses Racer data synchronization library which we create like this:

var store = derby.createStore({
  listen: server
});

To fetch some data from back-end to the front-end we instantiate model object:

var model = store.createModel();

Most importantly we need to pass model and routes as middlewares to Express.js app. We need to expose public folder for socket.io to work properly.

expressApp.
  use(store.modelMiddleware()).
  use(express.static(__dirname + '/public')).
  use(derbyApp.router()).
  use(expressApp.router);

Now we can start the server on port 3001 (or any other):

server.listen(3001, function(){
  model.set('message', 'Hello World!');
});

Full code of index.js file:

var http = require('http'),
  express = require('express'),
  derby = require('derby'),
  derbyApp = require('./derby-app');

var expressApp = new express(),
  server = http.createServer(expressApp);

var store = derby.createStore({
  listen: server
});

var model = store.createModel();

expressApp.
  use(store.modelMiddleware()).
  use(express.static(__dirname + '/public')).
  use(derbyApp.router()).
  use(expressApp.router);

server.listen(3001, function(){
  model.set('message', 'Hello World!');
});

Derby Application

Finally, Derby app file which contains code for both a front-end and a back-end. Front-end only code is inside of app.ready() callback. To start, let’s require and create an app. Derby uses unusual construction (not the same familiar good oldmodule.exports = app):

var derby = require('derby'),
  app = derby.createApp(module);

To make socket.io magic work we need to subscribe model attribute to its visual representation, in other words bind data and view. We can do it in the root route, and this is how we define it (patter is /, a.k.a. root):

app.get('/', function(page, model, params) {
  model.subscribe('message', function() {
    page.render();  
  })  
});

Full code of derby-app.js file:

var derby = require('derby'),
  app = derby.createApp(module);

app.get('/', function(page, model, params) {
  model.subscribe('message', function() {
    page.render();  
  })  
});  

Launching Hello World App

Now everything should be ready to boot our server. Execute node . or node index.js and open a browser at http://localhost:3001. You should be able to see something like this: http://cl.ly/image/3J1O0I3n1T46.

Derby + Express.js Hello World App

Passing Values to Back-End

Of course static data is not much, so we can slightly modify our app to make back-end and front-end pieces talks with each other.

In the server file index.js add store.afterDb to listen to set events on messageattribute:

server.listen(3001, function(){
  model.set('message', 'Hello World!');
  store.afterDb('set','message', function(txn, doc, prevDoc, done){
    console.log(txn)
    done();
  }) 
});

Full code of index.js after modifications:

var http = require('http'),
  express = require('express'),
  derby = require('derby'),
  derbyApp = require('./derby-app');

var expressApp = new express(),
  server = http.createServer(expressApp);

var store = derby.createStore({
  listen: server
});

var model = store.createModel();

expressApp.
  use(store.modelMiddleware()).
  use(express.static(__dirname + '/public')).
  use(derbyApp.router()).
  use(expressApp.router);

server.listen(3001, function(){
  model.set('message', 'Hello World!');
  store.afterDb('set','message', function(txn, doc, prevDoc, done){
    console.log(txn)
    done();
  })   
});

In Derby application file derby-app.js add model.on() to app.ready():

  app.ready(function(model){
        model.on('set', 'message',function(path, object){
        console.log('message has been changed: '+ object);
      })
  });

Full derby-app.js file after modifications:

var derby = require('derby'),
  app = derby.createApp(module);

app.get('/', function(page, model, params) {
  model.subscribe('message', function() {
    page.render();
  })
});app.ready(function(model) {
  model.on('set', 'message', function(path, object) {
    console.log('message has been changed: ' + object);
  })
});

Now we’ll see logs both in the terminal window and in the browser Developer Tools console. The end result should look like this in the browser:http://cl.ly/image/0p3z1G3M1E2c, and like this in the terminal:http://cl.ly/image/322I1u002n38.

Hello World App: Browser Console Logs

Hello World App: Terminal Console Logs

For more magic in the persistence area, check out Racer’s db property. With it you can set up an automatic synch between views and database!

Let me know if you’re interested in any specific topic for future blog post and don’t forget to checkout my JavaScript books:

The full code of all the files in this Express.js + Derby Hello World app is available as a gist at https://gist.github.com/azat-co/5530311.

A blip, not a strain, on PH-Taiwan relations

It is most unfortunate that the government of Taiwan has suspended the issuance of visas to Filipinos intending to either work or visit their island. The suspension was in reaction to the unfortunate killing of a Taiwanese fisherman by the Philippine Coast Guard (PCG) in contested waters a few days ago.
The emotional reaction is understandable because Taiwan considers itself the aggrieved party. But Taiwan-Philippine relations have always been excellent, and there is no reason why they should not continue to remain so.

Sooner or later, the incident will be seen in its proper perspective. The PCG was only doing its job, and had no intention of inflicting harm, much less causing the death, of the fisherman from Taiwan. A representative from the Philippine government has already visited the family of the victim to offer condolences and to explain why the country had to act the way it did.

The Taiwanese should understand the Philippines’ situation vis-à-vis its territorial waters. China, for one, has been aggressively asserting its claim on Philippine territory in recent months and taking no action against perceived threats is not an acceptable option.

Unlike China, Taiwan may be easier to talk to where territorial conflicts are concerned.

One tragic event should not permanently strain Philippine-Taiwan relations.

My vi/vim cheatsheet

Cursor movement

  • h – move left
  • j – move down
  • k – move up
  • l – move right
  • w – jump by start of words (punctuation considered words)
  • W – jump by words (spaces separate words)
  • e – jump to end of words (punctuation considered words)
  • E – jump to end of words (no punctuation)
  • b – jump backward by words (punctuation considered words)
  • B – jump backward by words (no punctuation)
  • 0 – (zero) start of line
  • ^ – first non-blank character of line
  • $ – end of line
  • G – Go To command (prefix with number – 5G goes to line 5)

Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.

Insert Mode – Inserting/Appending text

  • i – start insert mode at cursor
  • I – insert at the beginning of the line
  • a – append after the cursor
  • A – append at the end of the line
  • o – open (append) blank line below current line (no need to press return)
  • O – open blank line above current line
  • ea – append at end of word
  • Esc – exit insert mode

Editing

  • r – replace a single character (does not use insert mode)
  • J – join line below to the current one
  • cc – change (replace) an entire line
  • cw – change (replace) to the end of word
  • c$ – change (replace) to the end of line
  • s – delete character at cursor and subsitute text
  • S – delete line at cursor and substitute text (same as cc)
  • xp – transpose two letters (delete and paste, technically)
  • u – undo
  • . – repeat last command

Marking text (visual mode)

  • v – start visual mode, mark lines, then do command (such as y-yank)
  • V – start Linewise visual mode
  • o – move to other end of marked area
  • Ctrl+v – start visual block mode
  • O – move to Other corner of block
  • aw – mark a word
  • ab – a () block (with braces)
  • aB – a {} block (with brackets)
  • ib – inner () block
  • iB – inner {} block
  • Esc – exit visual mode

Visual commands

  • > – shift right
  • < – shift left
  • y – yank (copy) marked text
  • d – delete marked text
  • ~ – switch case

Cut and Paste

  • yy – yank (copy) a line
  • 2yy – yank 2 lines
  • yw – yank word
  • y$ – yank to end of line
  • p – put (paste) the clipboard after cursor
  • P – put (paste) before cursor
  • dd – delete (cut) a line
  • dw – delete (cut) the current word
  • x – delete (cut) current character

Exiting

  • :w – write (save) the file, but don’t exit
  • :wq – write (save) and quit
  • :q – quit (fails if anything has changed)
  • :q! – quit and throw away changes

Search/Replace

  • /pattern – search for pattern
  • ?pattern – search backward for pattern
  • n – repeat search in same direction
  • N – repeat search in opposite direction
  • :%s/old/new/g – replace all old with new throughout file
  • :%s/old/new/gc – replace all old with new throughout file with confirmations

Working with multiple files

  • :e filename – Edit a file in a new buffer
  • :bnext (or :bn) – go to next buffer
  • :bprev (of :bp) – go to previous buffer
  • :bd – delete a buffer (close a file)
  • :sp filename – Open a file in a new buffer and split window
  • ctrl+ws – Split windows
  • ctrl+ww – switch between windows
  • ctrl+wq – Quit a window
  • ctrl+wv – Split windows vertically

Another good vim commands cheatsheet and a vi introduction using the “cheat sheet” method

Cockfighting

Cockfighting
Cockfighting

What it is?

cockfight is a blood sport between two roosters (cocks), or more accurately gamecocks, held in a ring called a cockpit. The first documented use of the word gamecock, denoting use of the cock as to a “game”, a sportpastime or entertainment, was recorded in 1646, after the term “cock of the game” used by George Wilson, in the earliest known book on the sport of cockfighting in The Commendation of Cocks and Cock Fighting in 1607.

History

Cock fighting is said to be the world’s oldest spectator sport. It goes back 6,000 years in Persia.

According to one author, there is evidence that cockfighting was a pastime in the Indus Valley Civilization. The Encyclopædia Britannica (2008) holds:

The sport was popular in ancient times in India, China, Persia, and other Eastern countries and was introduced into Ancient Greece in the time of Themistocles (c. 524–460 BC). For a long time the Romans affected to despise this “Greek diversion”, but they ended up adopting it so enthusiastically that the agricultural writer Columella (1st century AD) complained that its devotees often spent their whole patrimony in betting at the side of the pit.

The significance of the original name of Mohenjo-daro inferring that the city was “the city of the cock” takes on great significance if taking into account that it has been claimed that the chicken was domesticated in southern China in 6000 BC. However, according to a recent study, “it is not known whether these birds made much contribution to the modern domestic fowl. Chickens from the Harappan culture of the Indus Valley (2500-2100 BC) may have been the main source of diffusion throughout the world.” “Within the Indus Valley, indications are that chickens were used for sport and not for food (Zeuner 1963)” and that by 1000 BC they had assumed “religious significance”.

Some additional insight into the pre-history of European and American secular cockfighting may be taken from the The London Encyclopaedia:

At first cockfighting was partly a religious and partly a political institution at Athens; and was continued for improving the seeds of valor in the minds of their youth, but was afterwards perverted both there and in the other parts of Greece to a common pastime, without any political or religious intention.

The image of a fighting rooster has been found the 6th century BC seal of Jaazaniah, discovered during the excavation of the biblical city of Mizpah in Benjamin, near Jerusalem.[15] It is one of the earliest depictions of a fighting rooster ever recovered. This depiction is consistent with the remains of these birds found at other Israelite Iron Age sites, when the rooster was used as a fighting bird; they are also pictured on other seals from the period as a symbol of ferocity, such as on the one engraved on a late-7th-century BC red jasper seal inscribed “Jehoahaz, son of the king”, which likely belonged to Jehoahaz of Judah “while he was still a prince during his father’s life.”

The anthropologist Clifford Geertz wrote the influential essay Deep Play: Notes on the Balinese Cockfight, on the meaning of the cockfight in Balinese culture.

Cockfighting in the Philippines

Cockfighting in the Philippines is called Sabong. There are illegal and legal cockfights. Legal cockfights are held on cockpits every week. Illegal cockfights, called tupada or tigbakay, are held in secluded cockpits where the authorities would not be able to operate raids. In both kind of cockfights, knives or gaffs are used. There are two kinds of knives used in Philippine cockfighting. The single edge blade (use in derbies) and double edged blades, lengths of knives also vary. All knives are attached on the left leg of the cock. But depending on the agreement between owners, blades can be attached on the right leg, or even on both legs. Sabong and illegal tupada, are judged by a referee called sentensyador orkoyme, whose verdict is final and not subject to any appeal. Bets are usually taken by the kristo, known as such for his outstretched hands when calling out wagers from the audience and skillfully doing so purely from memory.

The Philippines has hosted several World Slasher Cup derbies, held twice a year and staged in Araneta Coliseum. The world’s leading game fowl breeders gather twice a year during this event.

Contrary to popular beliefs Cockfighting was not introduced in the Philippines by the Spanish. Cockfighting was already flourishing as recorded by Antonio Pigafetta the Italian recorder of Magellan. The Philippines which is a south east Asian nation shares the culture of the Indians and the south east Asian nations in which the jungle fowl(bankivoid) and Oriental type chickens are endemic.

Insights

There’s a sport to it. We’re not just out here trying to kill a rooster. There’s a sport to it. All of the chicken breeders are friends. All of the chicken breeders have ‘gentlemen’s agreements’, you know what I mean? It’s a fair sport. There’s thousand and thousands of dollars or pesos that are being gambled and spent on chickens everyday.