Archive for the ‘Misc’ Category

Changing git master after cloning

If you’ve cloned a GitHub repository from the original one and not from your forked version and you would like to change it, you can just edit the .git/config file in your project and change the URL of the origin remote: [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = VALUE_WHICH_SHOULD_BE_ADJUSTED Simple, easy, and most importantly – [...]

Read the rest of this entry »

Running GUI applications over SSH

If you want to execute a GUI based application on the remote server through SSH, you can achieve it quite easily using the ssh command. Just type ssh -X username@server The -X flag is used to define the DISPLAY environmental variable on the remote host, so each X11 executed application will be forwarded to your [...]

Read the rest of this entry »

BASH: find files with names different than the pattern

If you’re using BASH find and want to find files which are named differently than the given pattern, you can use the following syntax: find . -type f ! -iname “*.class” The above command will find all files in the current directory (and subdirectories) which have the extension different (exclamation mark) from “class” (case insensitive). You [...]

Read the rest of this entry »

Every possible combination of given letters in BASH

If you want to create every possible word or combination of letters (or any other characters) you can use very simple BASH function: $ echo {a..c} This command will print all possible letters starting with a and ending on c (inclusive), so the result is: a b c You can get every possible combination of [...]

Read the rest of this entry »

Problem with execution of SNX on GNU/Linux (libstdc++)

I’ve recently bumped into a problem with using a SSL Network Extender when trying to establish a VPN connection through the web browser. The SNX was throwing a ‘failed to initialize’ error without any details despite the right credentials. To identify the error, I needed to execute the snx from the command line (snx) which [...]

Read the rest of this entry »

System-wide SOCKS Proxy

Sometimes, there is a need to use SOCKS Proxy for connection even if an application itself isn’t providing such feature. If you’re working on Windows you can use FreeCap which allows you to put your applications into FreeCap “sandbox”. Everytime you run app from this “sandbox” it is sent through the SOCKS proxy you set [...]

Read the rest of this entry »

How to set up an Apache2 + OpenSSL environment

Recently I was trying to configure a SSL site working on a localhost. The whole point was to configure the Apache2 to work with the SSL and I found this site to be particular useful why trying to solve this problem Be the first to like. Like Unlike

Read the rest of this entry »

How to turn off the autocomplete=”off” feature in Firefox

Sometimes you just really want to use the autocomplete feature and omit the HTML form autocomplete=”off”. To do so, you need to modify following file (the firefox version might, and probably will be, different than the one posted below): /usr/lib/firefox-3.6.10/components/nsLoginManager.js (in Windows it might be something like C:\Program Files\Mozilla Firefox\components\nsLoginManager.js) Change this: _isAutocompleteDisabled : function [...]

Read the rest of this entry »

SNX in Ubuntu 10.04

It seems that in Ubuntu 10.04 the tun module (which is used to create fake network interface) is compiled into the kernel instead of being a module as in Ubuntu 9.10. It results in error while running the snx command: FATAL: Module tun not found. This problem can be solved either by recompiling the kernel [...]

Read the rest of this entry »

LaTeX – acronyms

Below is a BASH command which will find all undefined acronyms used in a LaTeX text. The result can be pasted into the appendix which lists the used acronyms. cat temp.txt |grep -oe “([A-Z]*\!)”|tr -d ‘\!()’|sort|uniq|xargs -i echo ‘\acro{‘{}’}{‘{}’}’ Exemplary result: \acro{TRM}{TRM} \acro{VM}{VM} \acro{WML}{WML} \acro{XP}{XP} Be the first to like. Like Unlike

Read the rest of this entry »