blog.sufmade.me
not all masked men who save lives are imaginary
Thursday, April 2, 2015
Friday, July 12, 2013
The Best Decepticon
Wednesday, June 19, 2013
Faraday Shield For Multiple EZ-Link Cards
https://en.wikipedia.org/wiki/Faraday_cage
Contactless Smart Cards
Singapore, being the high-tech place it is, produces lots of cards.
Membership cards, credit cards, door access cards, contactless public transport fare (ez-link) cards.
Some of the more innovative companies produce multi-purpose cards!
The result is a Frankenstein member/credit/ez-link card.
This was great at first, I survived a long time carrying a bare minimum of 2 cards to deal with life. Suddenly, I was given an extra membership club that had a lot of benefits that I wanted to carry around too.
The Problem
However, it was also an ez-link card. The problem with that is that if you hold up your wallet to an ez-link card reader on the bus or train station, it would throw an error as it detects multiple cards. With a loud series of beeps and flashing red lights. In a bunker somewhere, a monotone voice says, "The terrorists win"
Also, I didn't want to physically separate my cards, nor flip my wallet open like an FBI agent every other day (I had outgrown that phase).
Credits For The Solution
I first saw the design concept of a wallet-based Faraday shield at a Singapore Hack and Tell.
The hacker envisioned a time when evil hackers would go around touching butt pockets to scan for credit card information. So he sort of implemented it as a public/private facing wallet, depending on how he kept his wallet in his pants.
He had gone through several iterations, using aluminium foil, etc, before concluding that a soda can was the most ideal, in terms of weight, thickness and effectiveness.
The Implementation
- Buy a can of soda
- Drink soda
- Clean can
- Cut off the top and bottom of the can
- Cut a straight line across the height so that you have a sheet, instead of a tube
- Cut card sized pieces from the sheet
- Bonus points if you got it to look good
Thursday, May 30, 2013
EVA-01
Almost couldn't concentrate on my work as I was imagining wearing this:
while riding this:
Source(s):
http://internetflexin.tumblr.com/
http://cyrem.org/freewill/evangelion-superbike-to-compete-in-july/
Monday, May 20, 2013
This Is My Lorem Ipsum
A New Hope
It is a period of civil war.
Rebel spaceships, striking
from a hidden base, have won
their first victory against
the evil Galactic Empire.
During the battle, Rebel
spies managed to steal secret
plans to the Empire's
ultimate weapon, the DEATH
STAR, an armored space
station with enough power
to destroy an entire planet.
Pursued by the Empire's
sinister agents, Princess
Leia races home aboard her
starship, custodian of the
stolen plans that can save her
people and restore
freedom to the galaxy...
The Empire Strikes Back
It is a dark time for the
Rebellion. Although the Death
Star has been destroyed,
Imperial troops have driven the
Rebel forces from their hidden
base and pursued them across
the galaxy.
Evading the dreaded Imperial
Starfleet, a group of freedom
fighters led by Luke Skywalker
has established a new secret
base on the remote ice world
of Hoth.
The evil lord Darth Vader,
obsessed with finding young
Skywalker, has dispatched
thousands of remote probes into
the far reaches of space...
Return Of The Jedi
Luke Skywalker has returned to
his home planet of Tatooine in
an attempt to rescue his
friend Han Solo from the
clutches of the vile gangster
Jabba the Hutt.
Little does Luke know that the
GALACTIC EMPIRE has secretly
begun construction on a new
armored space station even
more powerful than the first
dreaded Death Star.
When completed, this ultimate
weapon will spell certain doom
for the small band of rebels
struggling to restore freedom
to the galaxy...
Thursday, April 11, 2013
Stop the Spam: Suzhou Beef Products
Tuesday, February 19, 2013
Stuttering / Lagging Nexus 7 [SOLVED]
I had an issue with a badly stuttering Nexus 7.
Everything that was supposed to be "Butter" was now stuttering, lagging or downright unresponsive.
Features affected:
Screen rotate
Turning screen on / off
Volume control
Keyboard pop up
Unresponsive Application
Unresponsive OS (even the screen wouldn't switch off with the hardware button)
I Googled around, read up the Currents fix and applied it, but it still didn't work.
Android 4.2.2 rolled out, but I haven't got it yet and didn't have the patience to wait.
Growing up with MS Windows, I had a strange suspicion it had something to do with a page file or a swap file. And so I continued Googling about Android page files or swap files or minimum space issues but came up empty.
So, on a hunch, I started to delete things.
Initially, I had left 1GB of free space, just because.
And I had recently downloaded some more files, that reduced it to around 800MBs free.
Not good.
After deleting a couple of large-ish CBRs and an episode of Battlestar Galactica, I now had slightly more than 2GBs free.
And my 16GB Nexus 7 is back to its snappy self.
Conclusion: A 16GB Nexus 7 requires 2GBs of free space to run smoothly.
Sunday, February 17, 2013
Made L5 Today
I made it to L5 today.
Found a portal with only 1 resonator, half drained, in town while I was out with the family for dinner.
Perhaps the attacker had left the area, having run out of XM.
With only about 1000AP remaining to level up, I didn't do anything too fancy. Stepping into the periphery of the portal, I deployed 7 resonators and recharged the lone 8th reso which had survived.
Level up.
Satisfied, I left to rejoin my family. Thinking back, I think I forgot to hack it for resources!
Tuesday, December 18, 2012
Cleaned Up Picasa Web Albums
They were also showing up on my Android devices with a Picasa logo.
Obviously, I didn't heed the warning popups.
The pics on this blog are broken now, as well as some of my Google+ posts.
Dear Google,
I need a better image management tool.
Regards,
Thursday, November 8, 2012
Violation of PRIMARY KEY constraint
The gist of the conversation below is regarding a Microsoft SQL Server error, "Violation of PRIMARY KEY constraint" that happens after a move from 1 environment to another.
The application was working previously, but no longer after the move.
What could possibly go wrong?
Sensitive information have been removed, but the entirety of the conversation is here, typos and all.
[10:10:44] Gymson Viente: im encountering this.. if you have any thoughts on this
[10:10:45] Gymson Viente: Violation of PRIMARY KEY constraint 'PK_TestValues'. Cannot insert duplicate key in object 'dbo.TestValues'. The duplicate key value is (devil).
The statement has been terminated.
[10:11:11] Muhammad Yussuf: in [database name]...?
[10:11:17] Gymson Viente: yup.. hehe
[10:11:28] Muhammad Yussuf: huh, that has never happened before
[10:11:36] Muhammad Yussuf: did they move DBs or something?
[10:11:38] Gymson Viente: heheh.. its not happening in QA also
[10:11:41] Gymson Viente: prod i mean
[10:11:51] Gymson Viente: yes.. its a new server.. everything is new
[10:11:54] Gymson Viente: [a QA URL]
[10:12:08] Gymson Viente: we have moved to [hosting provider A].. from [hosting provider B]
[10:12:23] Gymson Viente: its ok suf.. im investigating it now.. see if i can find something
[10:12:29] Muhammad Yussuf: sounds like... someone forgot to set the table's last id when they moved the data
[10:12:38] Gymson Viente: hmmm..last id?
[10:12:53] Muhammad Yussuf: yeah, i forgot what it's called... the correct term
[10:13:07] Gymson Viente: its in QATest db
[10:13:25] Gymson Viente: whats the logic on this?. so that i can find it on myself
[10:13:28] Gymson Viente: ill try
[10:13:35] Muhammad Yussuf: ms sql right?
[10:13:40] Gymson Viente: yes
[10:14:11] Muhammad Yussuf: its like this, when a new table is created, internally, MSSQL saves the last primary key == 1 and increments it when a new row is created
[10:14:32] Muhammad Yussuf: but when you import data, you switch it off, so you can import your primary key too
[10:14:49] Gymson Viente: ah.. didnt know that part
[10:15:07] Gymson Viente: so whats the best solution for this?
[10:15:17] Muhammad Yussuf: after import, you're supposed to set that internal number to the last number inserted and switch on the feature again
[10:16:13] Gymson Viente: actuallly.. i had some problems also.. adding input parameters.. but i did a workaround..
[10:16:22] Gymson Viente: at the parameters side i did this
[10:16:30] Gymson Viente: SET IDENTITY_INSERT parameters ON
INSERT INTO Parameters(id, methodid, Name) VALUES(2356,134,'startDateTime')
INSERT INTO Parameters(id, methodid, Name) VALUES(2357,134,'endDateTime')
[10:16:32] Gymson Viente: and it work
[10:16:39] Gymson Viente: before.. it never allowed me to insert
[10:17:20] Muhammad Yussuf: yeah, so basically, your primary keys of that table is screwed up
[10:17:27] Gymson Viente: tsktsktsk
[10:17:36] Gymson Viente: any way to fix this suf?
[10:17:56] Muhammad Yussuf: it's mostly a DBA issue... you should forward to [our DBA]?
[10:18:22] Gymson Viente: i am trying to talk to her on this.. if she has any ideas... heheh
[10:18:29] Gymson Viente: ok.. ill work with her on this
[10:18:31] Gymson Viente: thank you suf!
[10:19:02] Muhammad Yussuf: but you understand the basic issue now? (if you need to explain to [our DBA])
[10:19:39] Gymson Viente: yeah.. when it was imported, the primary key was never turned off.. right?
[10:20:04] Gymson Viente: so that messes up everything.. is that it?
[10:21:17] Muhammad Yussuf: http://williamsportwebdeveloper.com/cgi/wp/?p=153
[10:21:24] Muhammad Yussuf: http://blog.sqlauthority.com/2010/04/04/sql-server-enable-identity-insert-import-expert-wizard/
[10:21:48] Gymson Viente: ok let me read it through
[10:22:23] Muhammad Yussuf: "This results in many errors when the web application attempts to insert new records without providing a value for the identity field because it is suppose to auto-increment"
[10:22:53] Gymson Viente: oh.. is that it?.. so the main solution for this.. is just to turn on the auto increment..
[10:23:31] Gymson Viente: but what if.. she never imported it.. she just backup and restore the DB.. that shouldnt happen right?
[10:23:38] Muhammad Yussuf: you can check, but i got a felling that it's already on... but it thinks the next number is 2, which already exists because of the import
[10:23:48] Gymson Viente: oh
[10:24:45] Muhammad Yussuf: so, the table needs to be set that the next number is 2001 or something (the number of the last pri key) so that the next row will be 2002
[10:24:45] Gymson Viente: ya ive seen its already auto increment
[10:26:23] Muhammad Yussuf: i think when you create an alter table script, it shows the next number under constraints
[10:27:07] Gymson Viente: alter to is not enable
[10:27:10] Gymson Viente: enabled
[10:29:55] Muhammad Yussuf: found it!
[10:29:56] Muhammad Yussuf: http://msdn.microsoft.com/en-us/library/aa933196(v=sql.80).aspx
[10:30:30] Muhammad Yussuf: basically alter table with a new seed. seed is the starting point. last row id. increment is 1
[10:31:36] Muhammad Yussuf: but.. if it's more than 1 or a few tables... delegate it to the DBAs...
[10:31:59] Gymson Viente: let me try to read on it
[10:32:23] Gymson Viente: which one is altering it suf?
[10:36:54] Gymson Viente: so i tried running this
[10:36:54] Gymson Viente: DBCC CHECKIDENT ('TestCases', NORESEED)
[10:37:02] Gymson Viente: it returns this
[10:37:03] Gymson Viente: Checking identity information: current identity value '12', current column value '1716'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
[10:37:14] Muhammad Yussuf: yeap
[10:37:30] Muhammad Yussuf: that confirms my suspicion
[10:37:46] Gymson Viente: so its expects.. 1716
[10:37:50] Gymson Viente: or +1
[10:37:58] Gymson Viente: the last number i see on the table is 1690
[10:38:26] Muhammad Yussuf: set your seed to 1717, to be safe
[10:38:42] Gymson Viente: a! no.. the last id i see is 1716
[10:39:03] Gymson Viente: so when entering a new entry, it should be ok righjt?
[10:39:53] Muhammad Yussuf: if you don't so the ALTER ...IDENTITY... SEED=1717, MS SQL will try to insert a new row as prikey = 13...
[10:40:00] Muhammad Yussuf: *do
[10:40:38] Muhammad Yussuf: which may cause a pri key constraint error, as prikey row 13 may already exist due to import
[10:41:02] Gymson Viente: so i need to alter the table having identity 1777.. is it?
[10:41:18] Muhammad Yussuf: correct
[10:41:31] Muhammad Yussuf: 1717
[10:43:53] Gymson Viente: you have a script to do that?.. i couldnt find it here.. the ones i see in google are all reseeding
[10:44:50] Gymson Viente: this script
[10:44:51] Gymson Viente: DBCC CHECKIDENT
(
TestCases,RESEED, 1717
)
[10:45:37] Gymson Viente: this is correct right?
[10:46:28] Muhammad Yussuf: not sure... :P copy a temp table to try it out... 1716 rows ain't a lot ;)
[10:46:33] Gymson Viente: hehehe
[10:46:36] Gymson Viente: ok
[10:48:09] Muhammad Yussuf: http://www.dbforums.com/microsoft-sql-server/664830-script-reset-identity-seed-identity-increment-values.html
[10:48:14] Muhammad Yussuf: http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/04d69ee6-d4f5-4f8f-a115-d89f7bcbc032/
[10:48:19] Muhammad Yussuf: http://dbaspot.com/ms-sqlserver/141929-script-alter-identity-identity-seed-identity-increment.html
[10:48:29] Muhammad Yussuf: some links i found on the topic
[10:49:01] Gymson Viente: ya this should work DBCC CHECKIDENT (tablename, RESEED, 0)
[10:49:12] Muhammad Yussuf: 0?
[10:58:09] Gymson Viente: but i think i let [our DBA] decide on this... dont want to break anything on the DB's end
[10:58:10] Gymson Viente: heheh
[10:58:50] Muhammad Yussuf: yeap, just present her the facts we found... she should know the fix and all affected tables
[10:58:58] Gymson Viente: ok... thanks suf
Tuesday, October 2, 2012
Trek 1.2 (2012) + Blackburn EX-1 Rack
Missed cycling to work with my stuff in a pannier instead of a sweaty backpack on my back.
Here's where I put it all together:
https://plus.google.com/u/0/117656446991353867555/posts/7QRMXHh13S5
Relevant Links:
http://www.trekbikes.com/us/en/bikes/road/sport/1_series/1_2/
http://www.blackburndesign.com/racks/ex-1-rack.html#.UWAtnJNTDh4
Sunday, April 29, 2012
Friday, April 27, 2012
In The Clouds
Dropbox offers up to 3GBs of free storage, if you tell your friends
Google Drive, the long rumoured service, finally goes live with 5GBs
SkyDrive finally got their act together and released 25GBs days before Google
My music is in Google Play,
My mobile photos are backup up regularly via Dropbox and Windows Live Mesh
What shall I keep in the massive 25GB SkyDrive that is accessible anywhere online?
(This would have been so useful back when I was in school)
Wednesday, November 23, 2011
Some Things Should Be Made Obvious #DNN
Q: What do the check boxes public role and auto assign under security roles mean and how does one use them?
A: Public role means that users can choose to "join" those roles by selecting the checkboxes for those roles at the bottom of their user profile page. Auto Assign assigns new registered users to that particular role automatically.
Snippet from: http://forums.asp.net/t/314593.aspx/1
Thursday, September 22, 2011
Package Recieved
Respro Nitesight Mask (L) (which has the same specs as the City Mask)
http://www.respro.com/protection-faqs/#q2
"1. The City filter uses Dynamic Activated Charcoal Cloth (DACC) a 95% pure charcoal weave, originally developed by the U.K. Ministry of Defence for use in the protection against chemical and bacteria warfare situations. We use DACC to effectively filter out Primary pollutants associated with vehicle exhaust emissions. The DACC is laminated with medical grade non woven polypropylene material which filters particulates from the air and helps prevent them from entering the respiratory system.
The City filter offers protection against: - Hydrocarbons. e.g. Benzene; Pyrene;1,3 Butadiene. - Acid gases. e.g. Nitrogen dioxide; Sulphur dioxide. - Photo-chemical pollutants. e.g. Low level Ozone - Particulates. e.g. Black smoke; Pollen; Lead oxide. For a more comprehensive list of all the chemicals that have tested with DACC, please go to the Industrial section of the website."
According to the NEA, haze consists of:
http://app2.nea.gov.sg/psi_faq.aspx
sulphur dioxide,
nitrogen dioxide,
ozone,
carbon monoxide
particulate matter called PM10 (particulate matter of 10 microns or smaller in size)
Wednesday, August 10, 2011
Saturday, July 23, 2011
Library Book Sale
Today, I judged books by their covers.
They were categorized in broad categories in piles and with 2 kids in tow, I had not much time to browse.
The word "bicycle" on the cover? Grab.
Terry Pratchett? No brainer. Grab.
Jim Butcher / Dresden? Grab.
Grabbed John Saul for the wife.
Grabbed a book with a nice, red cover. No idea what's in it.
...and a couple more I'm sure I won't get around to reading.
But hey, $2 a book!
Friday, July 22, 2011
Friday, June 10, 2011
Monday, May 30, 2011
PortQry - The Ping For Ports
Sunday, May 22, 2011
Wednesday, March 16, 2011
Building a Build Machine
- Get Latest Codes
- Build Codes
- Deploy
- Test
- Logging
- Reporting
- Getting the latest codes; and
- Building codes
- A clean install of Windows Server 2008 Standard Full x64
- Set it up with a Role of a Web Server with default IIS7 settings.
- Get the latest copy (in my case, version 3) of Microsoft's Web Platform Installer from http://www.microsoft.com/web/downloads/platform.aspx
- Use it to install .NET Framework 3.5 SP1
Sunday, November 21, 2010
PHP on IIS7 on Windows 7 Home Premium
Enable IIS7 on Windows 7 Home Premium
Monday, November 8, 2010
Compare MS SQL Databases
Wednesday, November 3, 2010
MS SQL Fast SELECT a Random Row
Friday, October 8, 2010
Wednesday, October 6, 2010
Posting to a Facebook Page
a) Facebook Authorization Docs: http://developers.facebook.com/docs/authentication/
b) Extended Permissions: http://developers.facebook.com/docs/authentication/permissions/
2 - Provide a page for Facebook to return to once the User has logged in / authorized your app