20 November 2013

Shorthand for nmap to scan all ports

Simply write a dash (-) after the -p switch as follow:
nmap 1.2.3.4 -p-

#1

16 October 2013

Progress database odbc error : Broker rejects connection

I was trying to link a Progress database to an SQL Express server few days ago.
The connection has first worked fine, but at one moment, I was not able to run any queries and finally got this error message :
DataDirect ODBC Progress OpenEdge Wire Protocol driver Broker rejects connection
In my case, this error was caused by too many active connections from the user I used to connect from ODBC.
But all the applications were closed.

So I've used the utility proshut to list all connected users and to kill the unreleased connections:
list connected users : [path to proshut]proshut.bat [path to your db].db -C list
kill a specific user :  [path to proshut]proshut.bat [path to your db].db -C disconnect [user number]

#1 #2

04 October 2013

Synology : Fix SVN package after moving svn repository directory

If you have moved the svn directory created by the SVN package, you may get an error message such "Error. Please reconnect to DSM".
You will not be able to use the SVN server untill you fix the symbolic link to the repository :
cd /var/packages/SVN/target
rm repo
ln -s [new_path_to_svn_repo_folder] repo


25 September 2013

Web development : Firefox show time on a date-only field when using the back button

I don't know why the cache system of firefox does show the time (set to 00:00:00) on my date field when I was using the back button, but I've fixed the problem by removing the autocomplete="off" attribute on the field...

23 August 2013

SQL server : Delete field description in order to allow a DB to be exported as a BACPAC file

Run the following query :
--tables
select 'EXEC sp_dropextendedproperty
@name = ''MS_Description''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id)
from sys.extended_properties
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id = 0
and extended_properties.name = 'MS_Description'
--columns
select 'EXEC sp_dropextendedproperty
@name = ''MS_Description''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id) + '
,@level2type = ''column''
,@level2name = ' + columns.name
from sys.extended_properties
join sys.columns
on columns.object_id = extended_properties.major_id
and columns.column_id = extended_properties.minor_id
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id > 0
and extended_properties.name = 'MS_Description'
And copy-paste-run the result as a new Query.

#1

12 August 2013

Access full clipboard history on a pattern locked Android Samsung Galaxy Ace 2

  1. On locked screen, draw an incorrect pattern 5 times till the button 'Forgot pattern?' appears.
  2. Click on this button.
  3. Click on the text box where the blinking caret is in order to make the text selector appear (you may need to click twice).
  4. Click on the text selector.
  5. And then click on 'Clipboard'.

You can then see all the clipboard history of the user...!


As far as I know, this hack is only working on Samsung Devices.

14 June 2013

Use your private linux server (NAS or other) as a proxy with ssh, PuTTY and Firefox

In PuTTY parameters, in Connection > SSH > Tunnels
  • Configure your SSH connection as usual
  • In Source port, input the port that putty will listen on (e.g. 44444).
    Use a port that is not currently used on the computer running putty
  • In  the three-option Local, Remote, Dynamic, choose Dynamic
  • Click the Add button
  • Click the Open button to connect to the server


In the Firefox options, Advanced > Network > Parameters, select the option Manual proxy configuration.
In the field SOCKS host, input 127.0.0.1 and in port, the port you have configured in PuTTY.





Your Firefox should now tunneling all your connections through your private server.

(This should also work with any server running SSH)

UPDATE 2014-03-12 : 

If you also would like to secure your DNS queries, write "about:config" in the address bar.
Then search for the value network.proxy.socks_remote_dns and set it to true 

#1

Linux : Run commands consecutively and grep output of all of them

Simply enclose the commands you want to grep in parentheses.

Examples :
> (./task1.sh && ./task2.sh) | grep "fail"
> (./task1.sh ; ./task2.sh) | grep "error"

16 April 2013

Change cover picture of a google+ album



Use this LINK to go back to the old picasa web interface.
Select the album you want to edit.
In the Action menu, select Album cover and change the cover.

1
The change will also be applied on your Google+ album.

03 April 2013

Visual Studio and MVC : "The project type is not supported by this installation"

If you just freshly (re)install your Visual Studio and you get the following error message when opening a web project using MVC :
The project type is not supported by this installation

(In the web project, the following term was underlined when opening the csproj for edit: MvcBuildViews)

Simply consider installing MVC using the Web Platform Installer (http://www.asp.net/mvc/mvc4) and NOT using the Extension Manager inside Visual Studio...

26 March 2013

Windows firewall rules not allowing a program located under your user profile path




If you use the file browser dialog when allowing a program through the Windows' firewall, part of the file's path could be automaticaly replaced by %USERPROFILE% if the file is located under your personal folder, for example, on your desktop.
The rule you've just added in the firewall will, in this case, simply NOT work...

Copy paste the full path (C:\Users\YourName\...) instead of %USERPROFILE% in the text field and it should do the trick.



04 March 2013

DSM 4.2 : scheduled tasks

If you have manually defined scheduled tasks in /etc/crontab, you can remove it and use the 'Scheduled tasks' tool embedded in the new DSM version to create your scheduled tasks.
Please be carefull that the tool uses its own config file in order to define the tasks (/usr/syno/etc/scheduled_tasks) and do not merge info with the crontab file when upgrading to DSM 4.2...

The /etc/crontab file is now only used to launch the tasks defined by the 'Scheduled tasks' tool.

Nevertheless, and hopefully, tasks defined manually in the crontab file are still working...

12 February 2013

Sharepoint 2013 Prerequisite Install - AppFabric Error

If you get an error when installing the AppFabric prerequisite with the prerequisiteinstaller.exe provided on the Sharepoint 2013 DVD, check your PSModulePath environment variable. There could be a trailing double-quote :
> C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules"
 Delete it and re-run the installer.

#1

08 February 2013

Configure virt manager (Virtual Machine Manager) to connect to remote server using your rsa key


First, you have to generate a private / public key pair and publish your public key on the host server running the virtual machines.
Information about it can easily be found on the web.

After, simply write your private key in the file id_rsa in the .ssh folder located in your home folder.
If the folder .ssh doesn't exist you can create it.

Ensure that only your user has the right to read that id_rsa file, or the key will be ignored when connecting to ssh :
> chmod 600 id_rsa
In the Add Connection form of the Virtual Machine Manager, select SSH method and root username (or any other user on the remote server where is published your public key)


Enjoy !