Posts

Recent Folders in Windows 10

Open File Explorer and type shell:::{22877a6d-37a1-461a-91b0-dbda5aaebc99} in the Address Bar.  Press {ENTER} This opens the Recent folders shell folder Click the Pin to Quick access button in the ribbon, to pin it in the Quick access area. 

A simple Python program that reads a textfile and creates 2-level folder structure based on the contents of the textfile

import os, sys # If directory (path) doesn’t exist, create it def createPath(path):    if not os.path.isdir(path):       os.mkdir(path) f = open(r"F:\Folders.txt") folder = "F:\\Documents\\" ## Read the first line line = f.readline() ## If the file is not empty keep reading line one at a time till the file is empty i=1 while line:     #print(line)     for char in '\n?.!/;:':        line = line.replace(char,'')     position = line.find("*")     if position == 0:       #print("line is {}" .format(line[1:]))       folder2 = folder + str(i) + "." + line[1:]       print(folder2)       createPath(folder2)       j=1       i=i+1     else:       if len(line.strip()) != 0:         folder3 = folder2 + "\\" + str(j) + "." + line       ...

Basic Skeleton for using the Facebook PHP SDK v.4.4.0

  <? session_start (); require_once ( ' Facebook/FacebookSession.php ' ); require_once ( ' Facebook/FacebookRedirectLoginHelper.php ' ); require_once ( ' Facebook/FacebookRequest.php ' ); require_once ( ' Facebook/FacebookResponse.php ' ); require_once ( ' Facebook/FacebookSDKException.php ' ); require_once ( ' Facebook/FacebookRequestException.php ' ); require_once ( ' Facebook/FacebookAuthorizationException.php ' ); require_once ( ' Facebook/GraphObject.php ' ); use Facebook\FacebookSession; use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookRequest; use Facebook\FacebookResponse; use Facebook\FacebookSDKException; use Facebook\FacebookRequestException; use Facebook\FacebookAuthorizationException; use Facebook\GraphObject; // init app with app id (APPID) and secret (SECRET) $appID = ' YOUR_APP_ID ' ; $appSecret = ' YOUR_APP_SECRET ' ; $appLoginURL = ' https:...

How to remove “Shared Folder Synchronization” from Windows 7 context menu

Image
Click “Start->Run->cmd” to open up a command prompt window Type the following commands in the command prompt cd C:\Program Files\Microsoft Office\Office14\ regsvr32 /u GROOVEEX.DLL You should see the above "success" message to inform you that the DLL has been unregistered and you should no longer see the "Git" menu items on your context menu Figure 1: Shared Folder Synchronization menu item still enabled Figure 2: Deregistering the GrooveEx.dll file Figure 3: Shared Folder Synchronization menu item no longer in context menu items Technorati Tags: Windows 7 , context menu , Shared Folder Synchronization , Groove

How to remove “Git” from Windows 7 context menu

Image
Click “Start->Run->cmd” to open up a command prompt window Type the following commands in the command prompt Technorati Tags: Git , Windows 7 , context menu You should see the above "success" message to inform you that the DLL has been unregistered and you should no longer see the "Git" menu items on your context menu

HOWTO in PHP: Retrieve a list of Facebook Pages you are the Administrator of using Graph API

Image
Here's the code. I am assuming here that you have already logged in as a valid Facebook user with the "manage_pages" scope permission. <?php require_once("fbphpsdk/facebook.php"); $config = array(); $config['appId'] = 'YOUR_APP_ID'; $config['secret'] = 'YOUR_APP_SECRET'; $config['fileUpload'] = false; // optional $facebook = new Facebook($config); $uid = $facebook->getUser(); $accesstoken = $facebook->getAccessToken(); $params = array('access_token' => $accesstoken); if ($uid) { try { $userprofile = $facebook->api('/me','GET'); echo "Name: " . $userprofile['name']; $accounts = $facebook->api('/me/accounts', 'GET', $params); foreach($accounts['data'] as $account) { echo "<hr/>" . $account['name'] . " " . $account['id'] . "<br/>...

How to get the Page ID of a Facebook Page from its username

Image
It is very easy Just type this in the addressbar of your browser and press enter. http://graph.facebook.com/<pageurl>/ E.g. when I type the following URL of my own Facebook Page, I yield the results as in Figure 1 below. http://graph.facebook.com/dorathetechplorer/ Hence, the Page ID of my page would be "157472464323620". Figure 1: Output from typing "http://graph.facebook.com/dorathetechplorer"