Facebook email permissions problem

Leave a comment

I just found out that if the user has an unconfirmed email in Facebook (i.e. Facebook sent him a validation mail to his email address but he didn’t respond) Facebook WILL NOT pass that email to your app even if he gave you the email permissions (!!!).

So what I did is use his Facebook email if he has a user name (i.e. userName@facebook.com).

How to take a screenshot in Facebook Poke without your friend knowing

Leave a comment

mzl.lvmquimn.175x175-75

Facebook just released Facebook Poke in the App Store, where You can send pokes, messages, photos and videos, to friends.
The nice feature is that when you send messages, photos and videos, you can choose how long they’ll be available for your friends to view up to 10 seconds. After that, they disappear from the app.

If you do take a screenshot, your friend will see304363929683337_1446266656聽next to your name letting them know聽you took it! Like a little snitcher 馃檪

AND HERE COMES THE HACK

In order to not “get caught” what you need to do when you got your friend聽poke, message, photo or video:

  1. Press the home button
  2. open settings app
  3. enable “Flight Mode”
  4. Press the home button again
  5. Open again聽Facebook Poke
  6. Press your friend message to see it.
  7. Quickly screenshot the message (Home and Sleep buttons at the same time).
  8. Press the home button
  9. Press the home button twice and kill聽Facebook Poke

And voila! Your friend聽poke, message, photo or video screenshot is in your device, and your friend would not get the infamous聽304363929683337_1446266656! 馃檪

Try it for yourself!

Thingies

Leave a comment

Logo_12_12_12

My new iOS app,

The first STEALING聽app in the world!

 

Want to know more? click聽here

How to remove Wikipedia Blackout with Chrome

5 Comments

As you all aware of, Wikipedia blackout their English website to protest against SOPA.

Although I’m very much against that law, the blackout can really damage other people work and education.

So for them here is the way to remove the blackout with using nothing but the chrome browser:

1. Go to your desired Wikipedia entry.

2. Right click the mouse on the big black W, and choose inspect element.

3. Press the delete button to remove the blackout div (It’s this one:

<div id="mw-sopaOverlay">...</div>

but you are already on it, so just press delete).

4. Go to the first element of the inspection – the head element – and press the arrow to open it and see all its contained elements.

5. Go to the last head contained element – this one:

<style id="mw-sopa-blackout">...</style>

and press delete button to remove it.

6. Now go to the body element and press the arrow to open it (if it’s not opened yet) and see all its contained elements.

7. Go to the content div element, this one:

<div id="content" style="display:none;">...</div>

double click “display: none;” and press the delete button to delete the style.

And voila, Wikipedia is as it was like no !@$#% SOAP Law was ever conceived! 馃檪
Enjoy

Muzik Market 2011 competition code parser for not just music Page

2 Comments

This is the code I’ve written to sum up the votes for the聽Muzik Market 2011 young artists competition.

The competition was in facebook here:聽https://www.facebook.com/NotJustMusic?sk=app_6009294086

here is a screen shot:聽

The voters can play each one of the youtube videos, and than write in the comment box which young artist the vote for.

I needed to parse their comments, and could not used the facebook graph api, because the comments are really the deprecated FBML fb:comments.

So I used a little bit of C# ,LINQ and regex matching to get the votes.

I saved the html source in a file (that you can download with the full html from here: 聽http://db.tt/6FthoYs)

the code is:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

namespace NotJustMusic
{
public class MuzikMarketParser
{
private static IDictionary<long,string> mUsersMsgs = new Dictionary<long, string>();
public static void Main(string[] args)
{
int totalVotes = 0;
var s = File.ReadAllText(
“muzikmarket2011CodeBehind.txt”);

var m = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)\”>[^<]+</a><span class=\”wall_time\”>[^<]+</span></h4><div><span dir=\”rtl\”>([^<]+)”, RegexOptions.IgnoreCase | RegexOptions.Compiled);
AddVotesToDic(m, ref totalVotes);

m = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)\”>[^<]+</a><span class=\”wall_time\”>[^<]+</span></h4><div><br>([^<]+)”, RegexOptions.IgnoreCase | RegexOptions.Compiled);
AddVotesToDic(m, ref totalVotes);

m = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)\”>[^<]+</a><span class=\”wall_time\”>[^<]+</span></h4><div>([^<]+)”, RegexOptions.IgnoreCase | RegexOptions.Compiled);
AddVotesToDic(m, ref totalVotes);

m = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)\”><span dir=\”rtl\”>[^<]+</span></a><span class=\”wall_time\”>[^<]+</span></h4><div>([^<]+)”, RegexOptions.IgnoreCase | RegexOptions.Compiled);
AddVotesToDic(m, ref totalVotes);

m = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)\”><span dir=\”rtl\”>[^<]+</span></a><span class=\”wall_time\”>[^<]+</span></h4><div><span dir=\”rtl\”>([^<]+)”, RegexOptions.IgnoreCase | RegexOptions.Compiled);
AddVotesToDic(m, ref totalVotes);

var mNotMatched = Regex.Match(s, “<a href=\”http://www.facebook.com/profile.php\\?id=([\\d]+)”);

while (mNotMatched.Success)
{
var id = long.Parse(mNotMatched.Groups[1].ToString());
if (!mUsersMsgs.ContainsKey(id))
{
Console.Out.WriteLine(id);
}
mNotMatched = mNotMatched.NextMatch();
}

var theAssembly = mUsersMsgs.Values.Count(p => p.Contains(“讗住诪讘诇讬”) || p.Contains(“assembly”) || (p.Contains(“砖讬专”) && p.Contains(“1”) && !p.Contains(“10”)));

var netaGalGal = mUsersMsgs.Values.Count(p => p.Contains(“neta”) || p.Contains(“gal”) || p.Contains(“谞讟注”) || p.Contains(“讙诇”) || (p.Contains(“砖讬专”) && p.Contains(“2”)));

var setler = mUsersMsgs.Values.Count(p => p.Contains(“住讟诇专”) || p.Contains(“住讟讗诇专”) || p.Contains(“诇讬讬谉”) || p.Contains(“stelar”) || p.Contains(“lane”) || (p.Contains(“砖讬专”) && p.Contains(“3”)));

var epicSign = mUsersMsgs.Values.Count(p => p.Contains(“epic”) || p.Contains(“sign”) || (p.Contains(“砖讬专”) && p.Contains(“4”)));

var asaf = mUsersMsgs.Values.Count(p => p.Contains(“assaf”) || p.Contains(“asaf”) || p.Contains(“讗住祝”) || p.Contains(“驻讬讬讘讬砖”) || p.Contains(“驻讬讘讬砖”) || (p.Contains(“砖讬专”) && p.Contains(“5”)));

var hofitDror = mUsersMsgs.Values.Count(p => p.Contains(“dror”) || p.Contains(“hofit”) || p.Contains(“讞讜驻讬转”) || p.Contains(“讚专讜专”) || (p.Contains(“砖讬专”) && p.Contains(“6”)));

var daniel = mUsersMsgs.Values.Count(p => p.Contains(“daniel”) || p.Contains(“讚谞讬讗诇”) || (p.Contains(“砖讬专”) && p.Contains(“7”)));

var moish = mUsersMsgs.Values.Count(p => p.Contains(“dokler”) || p.Contains(“moysh”) || p.Contains(“诪讜讬砖”) || p.Contains(“诪讜讬砖”) || p.Contains(“讚讜拽诇专”) || p.Contains(“讚拽诇专”) || (p.Contains(“砖讬专”) && p.Contains(“8”)));

var omer = mUsersMsgs.Values.Count(p => p.Contains(“注讜诪专”) || p.Contains(“住讜诇讜讚讜讱”) || p.Contains(“住讜诇讚讜讱”) || p.Contains(“omer”) || (p.Contains(“砖讬专”) && p.Contains(“9”)));

var benia = mUsersMsgs.Values.Count(p => p.Contains(“讘谞讬讛”) || p.Contains(“讘谞讬讬讛”) || p.Contains(“讘专讘讬”) || p.Contains(“barbi”) || p.Contains(“benia”) || p.Contains(“讘 谞 讬 讛”) || (p.Contains(“砖讬专”) && p.Contains(“10”)));

Console.Out.WriteLine(“theAssembly: ” + theAssembly);
Console.Out.WriteLine(“netaGalGal: ” + netaGalGal);
Console.Out.WriteLine(“setler: ” + setler);
Console.Out.WriteLine(“epicSign: ” + epicSign);
Console.Out.WriteLine(“asaf: ” + asaf);
Console.Out.WriteLine(“hofitDror: ” + hofitDror);
Console.Out.WriteLine(“daniel: ” + daniel);
Console.Out.WriteLine(“moish: ” + moish);
Console.Out.WriteLine(“omer: ” + omer);
Console.Out.WriteLine(“benia: ” + benia);

Console.Out.WriteLine(“Total Votes: ” + totalVotes);

Console.Out.WriteLine(“Total Unique Votes: ” + mUsersMsgs.Keys.Count);

Console.Out.WriteLine(“Total Unique Legal Votes: ” +(int)( theAssembly + netaGalGal + setler + epicSign + asaf + hofitDror + daniel + moish + omer + benia));

}

private static void AddVotesToDic(Match m, ref int totalVotes)
{
while(m.Success)
{
totalVotes++;
var id = long.Parse(m.Groups[1].ToString());
var msg = m.Groups[2].ToString();
if (!mUsersMsgs.ContainsKey(id))
{
mUsersMsgs.Add(id, msg.ToLower());
}
m = m.NextMatch();
}
}
}
}

the output is:

theAssembly: 4
netaGalGal: 2
setler: 179
epicSign: 9
asaf: 174
hofitDror: 10
daniel: 42
moish: 150
omer: 1070
benia: 1018
Total Votes: 2844
Total Unique Votes: 2675
Total Unique Legal Votes: 2658

So the winner with 1070 votes is the young artist

Omer Solodoch!

The Wheel Of time: Padan Fain Character Resemblance

1 Comment

Padan Fain

I want to add my 2 cents to the resemblance of Padan Fain from Wheel Of Time to Gollum and Mr. Smith:

  • Padan Fain resembles much Gollum from The Lord of the Rings, the points of聽parallel are:
  1. Both were changed to something much evil and possessed by a sinister artifact (the ring / the dagger) which they treasure the most
  2. Both are considered insane.
  3. Both had a name when they were 鈥渘ormal鈥 (Sm茅agol/Padan) and a name after the possession (Gollum / Ordeith || Jeraal Mordeth).
  4. Both chased the main character and a friend for retrieving the artifact (Gollum聽chased Frodo and Sam, Padan chased mat and Rand).
  5. Both tried to kill them but failed (Gollum聽tried to strangle Sam and kill them by luring them to Shelob cave, Padan tried to kill Rand and lure them to a trap in Far Madding).
  6. Both were in the possession by the dark one in its stronghold for retrieving information (Gollum by Sauron in mordor, 聽Padan by the dark one in Shayol Ghul)
  • Padan somewhat resembles Mr. Smith聽from The Matrix as both are considered anomalies in the pattern / Matrix, and second villains to the 鈥渘atural鈥 villains (the Machines / the dark one).
    As I see it both will play a significant role in the final showdown against the supposedly greater evil.

What do you think?

Company Automatic Hibernation

Leave a comment

In order to cut on electricity costs on this recent Economic Crises, I came up with an idea.

It鈥檚 a simple one, but as I see it, it can save a company a lot of money on electrical.

The idea is to develop a cross-company process that will put every employee computer in hibernation at a specific time.

So how will the Automatic Hibernation work?

  1. A daily Hibernation time is set.
  2. 30 minute grace period before hibernation lets the user cancel the hibernation.
  3. If not canceled the computer hibernates.
  4. If the user wants to connect to the computer, a wakeup call is initiated on the computer, and it鈥檚 turned on.

Now we鈥檒l see why people do not turn off their computer, and how Automatic Hibernation deals with each one of the problems:

  1. Don鈥檛 remember
  • Don鈥檛 need to remember, that鈥檚 why it鈥檚 automatic.
  1. 2. Don鈥檛 really care
  • Don鈥檛 need to care anymore, the company cares about the electrical bill.
  1. Want to get back to their already opened applications
  • Hibernation lets you get right back to the state where you were before the hibernation.
  1. Want to have the ability to remotely connect from home to their computer
  • In order to remotely connect to a shut down / hibernated computer we need to do 2 things:

1)聽聽聽聽聽 Make sure that each network card on an employee PC has what鈥檚 called wake up capability.

2)聽聽聽聽聽 Add a wake up feature to the company remote access.

What is needed for the Automatic Hibernation to be applied on the employees鈥 computer?

  1. Develop Automatic Hibernation.
  2. Enable wake up capability on all network cards (replace the ones that don鈥檛 have if needed).
  3. Add a wake up feature to the company remote access
  4. Reserve in each computer HDD enough space for the hibernation (RAM memory size will suffice).
  5. Inform all employees about Automatic Hibernation and the hibernation time.
  6. Install in all the computers the Automatic Hibernation process.

And finally what鈥檚 the rough cost cut for the company?

1.聽聽聽聽聽聽聽聽聽聽聽 E employees/Computers.

2.聽聽聽聽聽聽聽聽聽聽聽 C consumption cost per hour.

3.聽聽聽聽聽聽聽聽聽聽聽 about 8 hours (12:00PM 鈥 8:00AM) hibernation.

E X C X 8 per day

E X C X 8 * 30 = per month

E X C X 8 * 30 * 12 per year

If we put some values in the variables like E = 5000, C = 0.02 $ then:

5000聽 X 0.02 聽X 8 聽= 800$ per day

5000聽 X 0.02 聽X 8 * 30 = 24,000$ per month

5000 X 0.02 聽X 8 * 30 * 12 聽= 288,000$ per year

We of course need to decrease from the above number a onetime development and deployment rough cost, so here is an example that is not that farfetched:

  1. 6000$ average developer cost for a month.
  2. 10 team members doing the development and deployment.
  3. 4 months development.
  4. 2 months deployment.
  5. 录 network cards to be replaced (assumption).
  6. 10$ per network card.

6000$ X (4 +2) X 10 +( E = 5000)/4 X 10 = 372,500$

A cost that will be covered in about a year, and from that point on there will only be a cut on the company electricity costs.

Interesting idea, not?