2014-04-17 11:05:51

Abel Gancsos
fix error for language headers on Mac

1) Open up Terminal
2) Type in xcode-select --install
3) Press Enter on the keyboard
4) Allow it to install



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2014-03-25 12:55:00

Abel Gancsos
fix right-border border collapse

border-right-style:solid;
border-right-color:;




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2014-03-20 00:17:28

Abel Gancsos
fix unattend error on Acer when generalizing

1) Click Start in bottom left corner
2) In the search filed type regedit then hit Enter on the keyboard
3) Naviagate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
4) Open the Start key
5) Change value to 0
6) Save key
7) Close registry
8) Reboot

OR

1) Open up CMD
2) type reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services /v Start /d 0 /f
3) Reboot



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2014-03-18 10:07:56

Abel Gancsos
connect to a network on an Apple

1) Click on the Wi-Fi logo on the top-right of the screen.
TIP: IT WOULD HAVE EITHER GREY OR BLACK HALF CIRCLES
2) Select network
NOTE: IF YOU HAVE A PASSWORD, ENTER THE PASSWORD



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2014-03-18 10:03:57

Abel Gancsos
fix Wi-Fi on Apple MacBook Air

The following is specific for the 11" 2011 MacBook Air:

If you are having difficulty with your Airport, especially after turning it off (for whatever reason you would), try the following:

1) Click on the Apple logo on the very top-left of the screen
2) Slowly go down the list and select [System Preferences]
3) Select [Network]
4) In the list on the left column, select the Wi-Fi connection
5) Remove the connection by clicking the [-] on the bottom of the left column
6) Click the [+] on the bottom of the left column
7) Add a Wi-Fi connection
8) Click [Apply]
NOTE: AT THIS POINT YOU ARE CONNECTED TO THE NETWORK YOU WERE ON BEFORE REMOVING THE CONNECTION, BUT THERE IS NO IP
NOTE: YOU WILL HAVE TO RECONNECT TO THE NETWORK



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2013-06-23 12:00:11

Abel Gancsos
print from Yahoo

1)Login to Yahoo!
2)Open appropriate email
3)Left-click [Actions]
(last button in purple)
4)Select [Print Messages]
5)Click [Print] if needed
6)Click [Print] if needed

NOTE:ON THE LAST SCREEN
BEFORE IT PRINTS, CONFIRM
THAT 'ALL PAGES' IS
SELECTED NEAR THE
BOTTOM



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2013-03-31 17:00:58

Abel Gancsos
close ports in Ubuntu

1) Run sudo fuser -v 25/tcp
2) Then run either killall [command/id] or stop [command/id]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2013-03-21 19:17:06

Abel Gancsos
find Windows desktop wallpapers

Windows Vista and higher: C:WindowsWebWallpaper

Else: C:Documents and SettingsYourNameLocal SettingsApplication DataMicrosoft



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2013-03-16 14:05:07

Abel Gancsos
copy MySQL table to new table

CREATE TABLE ${new_table} LIKE ${old_table}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2013-02-17 18:54:06

Abel Gancsos
run sudo in one command

echo |sudo -S



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-12-27 12:07:24

Abel Gancsos
enable Administrator account on the Welcome Screen

1) Open up RegEdit
2) Navigate to [ HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonSpecialAccountsUserList ]
3) Look for Administrator on the right side, if not there create a new one by right-clicking and select new dword
4) Select Administrator in the right panel and set the value to 1
5) Reboot machine



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-12-21 18:13:14

Abel Gancsos
return to the origin in opengl

glLoadIdentity();



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-12-13 11:30:05

Abel Gancsos
restart SSH under Ubuntu Server

service ssh restart



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-11-30 18:36:26

Abel Gancsos
burn .iso on Mac

1) Right click on .iso
2) Left click on [Open With]
3) Left click on [Disk Utility]
4) In Disk Utility, click [Burn]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-10-16 00:57:25

Abel Gancsos
delete programs on TI-8x

1) Hit [2nd]
2) Hit [+]
3) Select [Programs]
4) Choose program
5) Hit [ENTER]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-10-11 14:07:41

Abel Gancsos
get current iPhone OS version

[[UIDevice currentDevice] systemVersion]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-10-11 14:00:52

Abel Gancsos
disable Software Update badge on iPhone

1) Open up iFile
2) Go to /var/mobile/Library/Preferences
3) Open up com.apple.springboard.plist
4) Look for OSSoftwareUpdateOSVersion
5) Change the OS version
6) Respring



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-10-11 13:34:49

Abel Gancsos
disable Software Update via Terminal

softwareupdate --schedule off



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-09-21 22:49:38

Abel Gancsos
take a snapshot of video in PHP using FFMPEG

1) install ffmpeg via aptitude install ffmpeg
2) The code:

function getPreview($file,$pName,$time){

exec("ffmpeg -ss ".$time." -i ".$file." -f mjpeg ".$pName);
}
?>


That's it!



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-09-21 00:53:05

Abel Gancsos
set footer always at bottom

1) put this right before you close the main div:

2) add this css:

#main{
min-height:86%;
max-height:86%;
height:auto;
}

#push{
height:[height];
clear:booth;
}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-08-11 21:11:03

Abel Gancsos
use wireless in Linux

1: Making sure that the wireless device is up: ifconfig [device] up

NOTE: If you are not sure, you can use ifconfig -a to see what devices you have

2: To scan for networks: iwconfig [device] scanning
3: To connect to any network: iwconfig [device] essid any
4: To connect to specific network: iwconfig [device] essid [network]
5: To set in /etc/network/interfaces (bootup):

auto [device]
iface [device] inet static
address [address]
network [network]
netmast [netmask]
broadcast [broadcast]
gateway [gateway]
wireless-essid [network-name]
wireless-mode Managed

NOTE: ALWAYS REMEMBER TO dhclient [DEVICE] TO GET NEW IP
TIP: SOMETIMES A DEVICE WILL REQUIRE A SPECIAL DRIVER, NOT INCLUDED IN LINUX
TIP: TRY TO AVOID CHEAP ADAPTERS, BUT YOU DON'T NEED THE MOST EXPENSIVE EITHER



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-08-07 18:32:54

Abel Gancsos
bypass verizon activation

On most routers/modems: 192.168.1.1/verizon/redirect.htm

If that doesn't work, try: 192.168.1.1/verizon/redirect



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-07-31 14:19:40

Abel Gancsos
allow php in html

Put the following into you htaccess file:


AddType application/x-httpd-php htm html php
AddHandler application/x-httpd-php .htm .html




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-07-28 14:28:00

Abel Gancsos
get IP in PHP

function getIP(){
return $_SERVER['REMOTE_ADDR'];
}
?>



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-07-27 22:22:18

Abel Gancsos
unlock iPhone 4 with SAM

Steps 1-3) - Install SAM repo:repo.bingner.com
Step 4) – Go into the Utilities tab and then tap on the De-Activate iPhone option. In order to double check that your iPhone is truly de-activated return to the main settings menu and go into the More Information tab. Look at the ActivationState label and it should display as Unactivated.

Step 5) - Now go back to the main settings pane once again, and then into the Method tab where you will need to select the By Country and Carrier option. You will then need to select the Country you are going to be using your iPhone in and then your actual Carrier. Please keep in mind that for some carriers with more than one network ID you will need to select the SIM ID option instead of selecting your carrier’s name.

Step 6) – After you have selected your carrier that you wish to use your unlocked iPhone with go into the More Information tab once again and copy the IMSI number that is present in the SAM Details section

Step 7) – With the IMSI number copied down somewhere safe you will need to click the Spoof Real SIM to SAM button.

Step 8 ) – When you have pushed the Spoof Real SIM to SAM button you will need to once again go back to the main screen, find your way to the Method tab and select the Manual option. Upon selecting the Manual option and returning to the main screen you will notice an IMSI input field. Paste the IMSI number you copied in step 6 now.

Step 9) – Grab your iPhone’s USB cable and connect it to your computer so that you can use iTunes to re-activate your iPhone. When iTunes has finished re-activating your iPhone you will need to double click the Phone Number label found in the details pane and ensure the ICCID matches that found on the SIM Card. Unfortunately if the numbers do not match you will need to restart the process from the beginning.

Step 10) – As long as the ICCID numbers do match you will need to unplug your iPhone, go back into SAMPrefs and disable SAM by sliding the Enabled button to the off position. Finally re-connect your iPhone to iTunes and do not be worried if any error messages pop up alerting you that your iPhone cannot be activated. Simply ignore these messages and restart iTunes a few times.

Step 11) – After a few minutes you should notice signal bars on your iPhone. This means the process has been successful and you now have an unlocked iPhone with the SIM card of your choice. One last thing to keep in mind however, is that if you notice push notifications are not working you can simply select the Clear Push option found in SAM, followed by once again re-connecting your iPhone to iTunes.

For all of those that have successfully unlocked their iPhone following this How To guide please keep in mind that this process only works with the SIM card used during the unlocking process. If you would like to use multiple SIM cards on your unlocked iPhone then you will need to repeat the process on the other SIM cards. Additionally, it is also recommended that you manually save the activation ticket generated that allows you to use your iPhone unlocked as it could be crucial in the future to preserve your unlock.

Manually save unlock ticket:

Step 1) – An unlock ticket will be generated after you successfully follow steps 1 – 10 outlined previously.

Step 2) – Use an SSH program to access your iPhone’s filesystem (WinSCP Windows or Cyberduck Mac OS X). You can of course also use something like iFile on your actual iPhone.

Step 3) – Navigate to the following directory:

/var/Root/ibrary/Lockdown



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-07-21 14:30:44

Abel Gancsos
add user to server

adduser --home /restricted/directory restricted_user



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-07-10 19:53:18

Abel Gancsos
fix Trojan Horse Dropper.Generic_c.MMI Found On Services.exe

1. Go to start, type "cmd" to open the command prompt
2. Type or copy & paste "sfc /scanfile=c:windowssystem32services.exe" and press enter
3. Restart your computer



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-06-27 12:04:57

Abel Gancsos
hide Important folder from Gmail

1-Sign into Gmail
2-Click [Settings] in the top-right
3-Click on the [Labels] tab
4-Remove any folders you don't want



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-06-24 00:52:37

Abel Gancsos
rewrite index to root

RewriteRule ^index.php / [R,L]




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-06-22 09:39:16

Abel Gancsos
fap

douchebag.....



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-06-15 13:00:17

Abel Gancsos
fix battery not charging

A: Software/Driver (Linux/Windows)

1-Turn off Microsoft Update (always a great idea anyway)
2- Ask the company to send an old driver
3- Install sent driver

B-Battery reset (Mac/Linux/Windows)

1-Unplug adapter
2-Take out battery
3-Hold power button for 10 seconds
4-Put battery back in
5-Plug adapter back in

C-Motherboard/DC-DC convertor

In this case, I would recommend consulting with your IT person about purchasing a new computer or just using the laptop with an adapter.



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-06-09 18:57:53

Abel Gancsos
set up table in cocoa touch

//Table functions

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

// Return the number of sections.
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

// Return the number of rows in the section.
return [_objects count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"TableCell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

// Configure the cell...
NSString *current=[_objects objectAtIndex:indexPath.row];
cell.textLabel.text=current;
return cell;
}

#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Navigation logic may go here. Create and push another view controller.

}




///




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-21 15:05:14

Abel Gancsos
properly implement camera picker in iPhone application

- (IBAction)takePic:(id)sender{
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.allowsEditing = YES;

[self presentModalViewController:picker animated:YES];
//other code
}

else{
matched_.text=@"You are running on a simulator....";

//other code
}



}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
UIImage *pickedImage = [info objectForKey:UIImagePickerControllerOriginalImage];
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(pickedImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}

taken_.image=pickedImage;
[self dismissModalViewControllerAnimated:YES];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[self dismissModalViewControllerAnimated:YES];
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-20 16:13:38

Abel Gancsos
quickly drain mac battery

yes > /dev/null



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-20 13:34:00

Abel Gancsos
fix print spooler dependency issue

1) Click [Start] in the bottom left corner
2) Click [Run]
3) Type EXACTLY the following sc config spooler depend= RPCSS
4) Press [Enter]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-16 17:00:56

Abel Gancsos
change boot screen on Linux

Put image in /usr/share/images/xsplash



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-16 16:47:56

Abel Gancsos
set hostname on mac, Apple

scutil –-set HostName new_hostname




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-16 16:46:06

Abel Gancsos

Open a terminal

type

sudo vi /etc/motd (use pico if your prefer)
enter your password

Ammend the file
Save

And restart terminal



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-12 23:08:39

Abel Gancsos
enable sourcetype on blackberry

1- Go into SMS/MMS or Messages
2- Start new message
3- Hit the menu button
4- Hit [Enable Sourcetype]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-12 23:08:08

Abel Gancsos
disable sourcetype on blackberry

1- Go into SMS/MMS or Messages
2- Start new message
3- Hit the menu button
4- Hit [Enable multitap]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-05-12 23:04:32

Abel Gancsos
delete old email address on blackberry

1- Go into [Options]
2- Go into [Advanced Options]
3- Go into [Service Book]
4- Look for the email address
5- Hit the menu button
6- Hit [Delete]
7- Confirm



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-25 20:41:03

Abel Gancsos
open view preferences in Mac, Apple, mac, Apple mac

[Command] + [J] AT THE SAME TIME



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-25 20:40:03

Abel Gancsos
set finder to open up list by default , Mac, Apple, Apple mac

1) Open up your hard drive
2) Open up Finder Preferences ([Command] + [J])
3) Make sure that [Open in Column View] is unchecked



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-24 17:30:18

Abel Gancsos
set gmail back to basic,google

A; long method

1- Go into gmail
2- Click the gear in the top-right
3- Click [Settings]
4- Click [Inbox] on the right column
5- Change marker settings
6- Click [Save Changes]
7- As soon as you see [Load basic HTML] on the bottom, CLICK IT!!!!

B-Link method
[]://mail.google.com/mail/?ui=html

2012-04-21 14:10:34

Abel Gancsos
Statically update width of browser window




2012-04-20 16:15:13

Abel Gancsos
detect window width with javascript

document.getElementById('links').style.width=window.outerWidth;

2012-04-20 15:27:28

Abel Gancsos
detect screen information

screen.[screen information]

2012-04-18 18:13:35

Abel Gancsos
clear image in cocoa


2012-04-18 16:50:49

Abel Gancsos
save edited image with Cocoa


2012-04-18 16:22:42

Abel Gancsos
import image into iPhone application


2012-04-15 12:14:14

Abel Gancsos
set a permanent mount point in Unix


2012-04-15 02:14:00

Abel Gancsos
format a new hard drive in Unix

So, you have been visited by the gigabyte fairy and you have a brand new external USB hard drive, you might be irked to find that it's already formatted with the NTFS filesystem because it's a default world out there ...
What to do?

(This will work for any old hard drive, so even if you have an internal one - you're good )

Stuff I assume
Your drive needs to be plugged-in and your system must see it. You should see an icon appear on your desktop. If not then open a console and try this:
If you have an external USB drive:
Code:
cd /dev
ls s*
If you have an internal drive:
Code:
cd /dev
ls hd*
You should see a list of things something like this for example:
Code:
sda sda1 sdb sdb1
That shows you that your system knows about two physical external drives (sda and sdb) as well as the partition that is on each. So, now you know that your machine knows about your new drive(s).

Make sure that your new drive is not mounted. Let's assume it's name is sda1 (please substitute your own details), at the console type:
Code:
mount | grep sda1
If you see any results then it's mounted, so do this:
Code:
umount -l /dev/sda1
Warning
Please ensure that you know exactly which drive you are going to erase and format... I speak from experience, hoo-boy! So, make sure you know which name identifies your drive. hdb or sda or sdc or whatever. Be sure. If you are not sure, then use whatever built-in tools that your distro has to try and get yourself oriented. You can also do this at the console:
Code:
fdisk -l
Now look at all the drives carefully, look at their types and sizes and make your mind up.

GUIs and Consoles
I use Kubuntu 6.06. I quite frankly could not figure out how to prepare my new USB drive from any of the system control panels. It was too confusing and ambigous. I don't know (and can only hope) whether Ubuntu is any better. The upshot? I will use the command line!

Let's get going!
Removing and creating a partition
Having decided your drive's name (let's call it sda) we must now remove the default partition that the manafacturer put there:
Code:
sudo fdisk /dev/sda
This will start fdisk. We want to remove the partion(s), there should only be one.
Press d (for delete).
It might ask you for the partition number, press 1 and enter. If there are more then delete them too.

Now to make a new partition.
Press n (for new), then p (for primary), then 1 and then simply press enter for the next two questions.
This will make a new partition that uses the entire disk. If you want more complex partitioning then read the fdisk manual (man fdisk) or use parted or some other app.
Here's what we did with n, the values will differ from yours:
Code:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (197-621, default 197):
Using default value 197
Last cylinder or +size or +sizeM or +sizeK (197-621, default 621): +128M
Now to write the new partion and exit, press w and enter.
You should be ready to make a filesystem now.

Making a filesystem : "Formatting"
You need to put a system in-place, on the disk, such that it can handle files. This is called (unsurprisingly) a filesystem.
The one we are going to use is called "ext3". On Gnu/Linux we are spoiled for choice and there are loads of filesystems you can use, go do some research if you want to.
So, let's make the filesystem:
Code:
sudo mkfs.ext3 /dev/sda1
* Note the 1 at the end, because we are making the filesystem in that partition (thanks Mike)

Now it will go off and do strange stuff, simply wait for it to finish.

Using the new file system
Well, at this point you should be able to right-click on the icon (on your Desktop) and choose "mount" (I assume that's the verb it will present to you). After that you should be able to open a window and use the drive*
* all this assumes it's an external USB drive.
If you cannot then you will need to mount it yourself, try:
Code:
sudo mkdir /media/sda1
sudo mount /dev/sda1 /media/sda1
Note: We are actually mounting the first partition on the drive, hence the 1 at the end: sda1
And the mounted directory can be anywhere you like, but its common location is /media.

If those two steps worked then you are 90% done.

You may need to make a single folder in the new drive and give it your user permissions:
Code:
cd /media/sda1
sudo mkdir afolder
chown you:you afolder
Where you insert your username and desired folder name as appropriate.

Please search around on the subject of your fstab and getting the drive to mount automatically when you reboot. There are plenty of howto's out there on that subject. I must post and run now.


Sidenote:
I think you intend to mkfs.ext3 the partition, not the whole device, hence:
Code:
sudo mkfs.ext3 /dev/sda1
Also, you need to specify a mount point for the device, since it's new, it won't be in fstab, so this:

Code:
sudo mount /dev/sda1
Should be this:

Code:
sudo mkdir /where/you/want/this/drive/to/be/mounted
sudo mount /dev/sda1 /where/you/want/this/drive/to/be/mounted

2012-04-14 17:09:36

Abel Gancsos
put a back button on your site



2012-04-12 00:40:18

Abel Gancsos
access a file via Internet Explorer

1) Open up IE
2) In the address bar type in:

[drive letter]:[file name]

3) Hit [Enter] on the keyboard



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-10 02:04:31

Abel Gancsos
put page in fullscreen with Javascript





TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-09 19:28:15

Abel Gancsos
string replace in JavaScript





TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-06 15:21:46

Abel Gancsos
detect operating system with JavaScript

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-03 20:36:57

Abel Gancsos
align a part of line while keeping the rest in tact , css

Use float


.right{
float:right;
}


.left{
float:left;
}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-02 01:01:51

Abel Gancsos
compare two characters in Cocoa

if(ch1==ch2){


///do something
}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-04-02 00:34:09

Abel Gancsos
concat strings in Cocoa

NSString *s1=@"I love ";
NSString *s2=input.stringValue;
NSString *s3=[s1 stringByAppendingString:s2];

[outPut setStringValue:[NSString stringWithFormat:@"%@",s3]];



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-31 22:21:22

Abel Gancsos
fix Dropbox access error

1) Sign in to Dropbox with the email you registered with
2) Click your name
3) Click [Settings]
4) Click [My Computers] tab
5) Click [Unlink] next to the machine you are having issues with
6) Restart Dropbox on that machine
7) Follow the screen instructions

TIP: IT'S OKAY IF YOU KEEP OLD SETTINGS

2012-03-31 22:18:03

Abel Gancsos
work with linked lists in C

1) Create the linked list node:

struct node{

int data;
struct node *next;
}


2) To do anything else you have to create a new node. In most languages you do this with new, but C does not know what new is. Instead:

node *newNode=malloc(sizeof(node));

NOTE: IT'S VERY VERY IMPORTANT THAT YOU USE THE NODE AS A POINTER

3) To access the actual data in the node:

newNode->data;

NOTE: NOTICE THE '->' YOU USE IT BECAUSE YOU HAVE A POINTER

4) To use in a loop:

while(newNode){

printf("%d",newNode->data);
newNode=newNode->next;
}


5) To insert into list:


void insertState(struct node **current,State a)
{
struct node* newNode = malloc(sizeof(struct node));
newNode->data = a;
newNode->tail = *current; // The '*' to dereferences back to the real head
*current = newNode;

}

6) To go through list to print:

void generate(struct node **list)
{
struct node *temp=(struct node*)malloc(sizeof(struct node));
temp=*list;

while(temp!=NULL)
{
printState(temp->data);
temp=temp->tail;
}

free(temp);
}


7) To delete from linked list:


void removeFromList(struct node *value, struct node **list)
{
struct node *currP,*prevP,*temp;

currP=(struct node*)malloc(sizeof(struct node));
prevP=(struct node*)malloc(sizeof(struct node));
temp=(struct node*)malloc(sizeof(struct node));
prevP = NULL;

currP=*list;
if(currP->tail==NULL)
{
*list=NULL;
}
else{
while(*list!=value)
{
prevP=*list;
currP=prevP->tail;
*list=currP;
}


}
}

2012-03-31 18:03:07

Abel Gancsos
load application in fullscreen mode, apple,mac

Add the following to the load method:

static BOOL shouldGoFullScreen = YES;
if (shouldGoFullScreen) {
if (!([self.window styleMask] & NSFullScreenWindowMask))
[self.window toggleFullScreen:nil];
shouldGoFullScreen = NO;
}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-30 12:58:50

Abel Gancsos
generate zeroed-out TOH 3 disks, tower of hanoi, tower of hannoi

NOTE: THE FOLLOWING IS REALLY AMATEURISH AND REALLY SHOULDN'T BE USED, BUT IT DOES ENSURE CORRECT STATES

void graphState(State a)
{
char PegA[3];
char PegB[3];
char PegC[3];


//PegA
if(a.d1==1 && a.d2==1 && a.d3==1)
{
PegA[0]=1;
PegA[1]=2;
PegA[2]=3;
}

if(a.d1==1 && a.d2!=1 && a.d3==1)
{
PegA[0]=0;
PegA[1]=1;
PegA[2]=3;
}

if(a.d1==1 && a.d2==1 && a.d3!=1)
{
PegA[0]=0;
PegA[1]=1;
PegA[2]=2;
}

if(a.d1==1 && a.d2!=1 && a.d3!=1)
{
PegA[0]=0;
PegA[1]=0;
PegA[2]=1;
}

if(a.d1!=1 && a.d2==1 && a.d3==1)
{
PegA[0]=0;
PegA[1]=2;
PegA[2]=3;
}

if(a.d1!=1 && a.d2!=1 && a.d3==1)
{
PegA[0]=0;
PegA[1]=0;
PegA[2]=3;
}

if(a.d1!=1 && a.d2==1 && a.d3!=1)
{
PegA[0]=0;
PegA[1]=0;
PegA[2]=2;
}




//PegB
if(a.d1==2 && a.d2==2 && a.d3==2)
{
PegB[0]=1;
PegB[1]=2;
PegB[2]=3;
}

if(a.d1==2 && a.d2!=2 && a.d3==2)
{
PegB[0]=0;
PegB[1]=1;
PegB[2]=3;
}

if(a.d1==2 && a.d2==2 && a.d3!=2)
{
PegB[0]=0;
PegB[1]=1;
PegB[2]=2;
}

if(a.d1==2 && a.d2!=2 && a.d3!=2)
{
PegB[0]=0;
PegB[1]=0;
PegB[2]=1;
}

if(a.d1!=2 && a.d2==2 && a.d3==2)
{
PegB[0]=0;
PegB[1]=2;
PegB[2]=3;
}

if(a.d1!=2 && a.d2!=2 && a.d3==2)
{
PegB[0]=0;
PegB[1]=0;
PegB[2]=3;
}

if(a.d1!=2 && a.d2==2 && a.d3!=2)
{
PegB[0]=0;
PegB[1]=0;
PegB[2]=2;
}


//PegC
if(a.d1==3 && a.d2==3 && a.d3==3)
{
PegC[0]=1;
PegC[1]=2;
PegC[2]=3;
}

if(a.d1==3 && a.d2!=3 && a.d3==3)
{
PegC[0]=0;
PegC[1]=1;
PegC[2]=3;
}

if(a.d1==3 && a.d2==3 && a.d3!=3)
{
PegC[0]=0;
PegC[1]=1;
PegC[2]=2;
}

if(a.d1==3 && a.d2!=3 && a.d3!=3)
{
PegC[0]=0;
PegC[1]=0;
PegC[2]=1;
}

if(a.d1!=3 && a.d2==3 && a.d3==3)
{
PegC[0]=0;
PegC[1]=2;
PegC[2]=3;
}

if(a.d1!=3 && a.d2!=3 && a.d3==3)
{
PegC[0]=0;
PegC[1]=0;
PegC[2]=3;
}

if(a.d1!=3 && a.d2==3 && a.d3!=3)
{
PegC[0]=0;
PegC[1]=0;
PegC[2]=2;
}




printf("\n\nGraph-\n\n");



printf(" %d\t %d\t %d\n",PegA[0],PegB[0],PegC[0]);
printf(" %d\t %d\t %d\n",PegA[1],PegB[1],PegC[1]);
printf(" %d\t %d\t %d\n",PegA[2],PegB[2],PegC[2]);

printf("___\t___\t___\n");
printf(" A \t B \t C \n\n");
}


2012-03-29 13:16:33

Abel Gancsos
disable guest account in ubuntu

1) cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.original
2) pico /etc/lightdm/lightdm.conf
3) Add allow-guest=false
4) Save



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-28 22:23:31

Abel Gancsos
fix XCode executable does not exist error for C

1) Make a new project
2) Copy code over to new project

TIP: IF YOU HAVE A .H FILE, MAKE SURE YOU SET THE TARGET
NOTE: THIS MAY NOT BE MANDATORY, BUT IT DOES INSURE THAT IT WORKS

3) (optional) If you need it to be in a specific location, first delete the old one and then move the new one

NOTE: STEP 3 IS VERY IMPORTANT IF YOU ARE WORKING WITH A CLOUD COMPUTING SET-UP




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-27 14:03:19

Abel Gancsos
limit character count during print out in C

printf("%[character count][characterType]",[variable]);

NOTE: THIS WILL NOT WORK IF YOU WANT TO PRINT OUT STRAIGHT TEXT



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-26 10:05:01

Abel Gancsos
fix textarea placeholder, php


echo '';

2012-03-23 22:17:52

Abel Gancsos
solve Tower of Hannoi with recursiion

void recursive(int x, char from,char to,char aux)
{
if(x==1)
{
printf("Move Disk %d From %c to %c",x,from,to);
}
else
{
recursive(x-1,from,aux,to);
printf("Move Disk %d From %c to %c",x,from,to);
recursive(x-1,aux,to,from);
}
}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-22 15:44:49

Abel Gancsos
set up printers in Unix

A) List possible printers:lpstat -a

B) Set global default printer: lpoptions -d [printer name] or export PRINTER=[printer name]





TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-22 09:07:28

Abel Gancsos
resize image proportionally with CSS

use max-width

NOTE: THIS WILL GREATLY BRING DOWN THE QUALITY IN IE, BUT IE SUCKS ANYWAY



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-21 13:07:40

Abel Gancsos
input string using C

void getLine(char a[255])
{
char chr;
int i=0;
while(chr!='\n')
{
chr=getchar();
a[i]=chr;
i++;

}
}

2012-03-21 13:04:24

Abel Gancsos
get string length using C

int linecount(char string[255])
{
int count=0,i=0;
char chr;
while(string[i]!='\n')
{
chr=string[i];
i++;
count++;
}

return ("%d",count);
}

2012-03-21 12:43:21

Abel Gancsos
put String in reverse using C

char *reverse(char a[])
{
int i=linecount(a)-1,j=0;

char temp2[linecount(a)-2];
while(i>=-1)
{
temp2[j]=("%s",a[i]);
i--;
j++;
}

return ("%s",temp2);
}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-21 12:41:27

Abel Gancsos
change string case in c

char *toLower(char a[])
{
int i=0;
char lower[linecount(a)-1];


while(i<(linecount(a)+2))
{

lower[i]=("%s",tolower(a[i]));

i++;
}
return ("%s",lower);
}

char *toUpper(char a[])
{
int i=0;
char lower[linecount(a)-1];
while(i<(linecount(a)+2))
{

lower[i]=("%s",toupper(a[i]));
i++;
}

return ("%s",lower);

}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-18 16:48:27

Abel Gancsos
fix cookies not setting, php, php cookies, cookies php

A: Make sure that the user had cookies enabled. By default, this should not be the cause
B: It is important that you set the cookies prior to printing ANY HTML tag

NOTE: IF YOU HAVE NO HTML TAGS, IT MIGHT NOT WORK EITHER.



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-18 16:34:52

Abel Gancsos
move bits of an array

int i=(sizeof(p3))-1;
while(i>0)
{
int j=i-1;
p3[i]=p3[j];
i--;
}
p3[1]=p3[0];

//Here you can insert if you want to



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-18 16:32:16

Abel Gancsos
insert in array using C

void insert(int a,int *p3)
{
int i=(sizeof(p3))-1;
while(i>0)
{
int j=i-1;
p3[i]=p3[j];
i--;
}
p3[1]=p3[0];
p3[0]=a;
}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-16 21:25:36

Abel Gancsos
put audio in C program for Mac

The following will only work on Apple Mac OSX 10.5 and above

To start: system("afplay [path to audio file] &");

To stop: system("killall afplay");



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-16 21:24:58

Abel Gancsos

The following will only work on Apple Mac OSX 10.5 and above

To start: system("afplay [path to audio file] &");

To stop: system("killall afplay");



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-16 14:04:42

Abel Gancsos
format print out in C, format display c

%i or %d int
%c char
%f float
%lf double
%s string



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-16 12:07:30

Abel Gancsos
print in C

printf([format],[variablename]);



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-16 12:07:00

Abel Gancsos
input in c

scanf([format of variable],&[variablename]);



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-15 14:27:00

Abel Gancsos
remove BIOS password, hack windows

Type DEBUG and hti Enter
-o 70 2e hit enter
-o 71 ff hit enter
-q hit enter
exit hit enter



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-15 14:26:14

Abel Gancsos
reset BIOS password in Command Prompt,hack windows

Go into Command Prompt and follow this:

A Press Enter
MOV AX,0 Press Enter
MOV AX,CX Press Enter
OUT 70,AL Press Enter
MOV AX,0 Press Enter
OUT 71,AL Press Enter
INC CX Press Enter
CMP CX,100 Press Enter
JB 103 Press Enter
INT 20 Press Enter
Press Enter
G Press Enter
Q Press Enter



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-15 14:23:05

Abel Gancsos
get bios information, hack windows

Enter the following in Command Prompt:

wmic bios get /format:list



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-15 10:59:47

Abel Gancsos

1) Login in via Linux/Unix
2) Go to c:windowssystem32configuresam
3) Save them to a flash drive
4) Use a third party program to decrypt the passwords



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-14 13:05:03

Abel Gancsos
install Ubuntu onto USB on Mac, apple

1) Download Ubuntu
2) Convert .iso the hdiutil convert -format UDRW -o ~/Desktop/ubuntu-11.10-desktop-amd64.img ~/Desktop/ubuntu-11.10-desktop-amd64.iso

3) Find the mount point of the USB via diskutil list
4) Format USB via diskutil unmountDisk /dev/disk[dnumber]
5) Put files onto the USB:

sudo dd if=~/Desktop/ubuntu-11.10-desktop-amd64.img.dmg of=/dev/rdisk[dnumber] bs=1m





TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-13 22:33:48

Abel Gancsos
prevent javascript errors

Place the following into the header file:







TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-13 14:06:43

Abel Gancsos
change read only USB, apple, mac

diskutil eraseDisk HFS+ newdisk disk1

NOTE: NEW DISK IS THE NAME FOR THE NEW DISK
NOTE: DISK1 IS THE MOUNT POINT->THIS WILL NOT ALWAYS BE DISK1
TIP: DO THIS UNDER SUDO
NOTE: THIS WILL GIVE YOU AN ERROR BUT WHEN YOU PUT THE DEVICE BACK IN IT WILL BE READY AND OKAY



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-13 02:16:40

Abel Gancsos
invert colors on Mac, Apple

[Control] + [Option] + [Command] + [8] AT THE SAME TIME

NOTE: TO UNDO INVERT, SIMPLY PRESS THE COMBINATION AGAIN



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-10 23:14:13

Abel Gancsos
add delay in Cocoa

NSDate *delay = [NSDate dateWithTimeIntervalSinceNow: 0.3];
[[NSRunLoop currentRunLoop] runUntilDate: delay];

NOTE: YOU CAN CHANGE THE LENGTH BY CHANGING .3 TO THE NUMBER OF SECONDS YOU WANT TO DELAY




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-09 18:27:02

Abel Gancsos
clear text in NSTextView, objective c, c

- (IBAction)reset:(id)sender{
[[name] setString:@""];
[[name] setNeedsDisplay:TRUE];
}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-09 13:55:53

Abel Gancsos
create a method with multiple parameters in Objective C, function with multiple parameters

- (void) print:(int) val1 :(int) val2 :(int)val3 :(double) val4{


}

NOTE: NOTICE THAT YOU SIMPLY PUT A SPACE, THE DATATYPE AND THEN THE VARIABLE NAME.
NOTE: NO COMMAS NECESSARY.



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-07 11:41:07

Abel Gancsos
make a site like this, become as intelligent as you, start a site like this

A magician never reveals his secret. If you attempt to recreate FoxHowTo, you will get an IP ban ;-)



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-07 02:02:21

Abel Gancsos
change settings for Notification Center in Mountain Lion, apple

1) Open up [System Preferences]
2) Click [Notifications]
3) Click on the app you want to change in the left column
4) Use the right column to change the settings you wish



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-06 19:04:51

Abel Gancsos
work with arrays in Objective C

////Create the array

NSMutableArray *[arrayname]=[[NSMutableArray alloc]init];

NOTE: USE ARRAY FROM NOW ON TO HANDLE THE ARRAY

////Insert into array

[[arrayname] addObject:[NSNumber numberWithInt [int]];


////Access object from array

[log insertText:[NSString stringWithFormat:@"%@",[[arrayname] objectAtIndex:[index]]]];




NOTE: THIS CASE IS SPECIFIC FOR AN INT ARRAY
NOTE: ARRAY IS NOT LIMITED TO ONLY INTEGERS
NOTE: IF YOU USE ANOTHER TYPE OF ARRAY, CHANGE THE RESPECTIVE LOCATIONS
NOTE: LOCATIONS INCLUDE CASTING AND NSSTRING FORMATING






TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-06 01:00:36

Abel Gancsos
upload to Unix server via command line

scp @:



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-05 14:41:25

Abel Gancsos
A* Algorithm

function A*(start,goal)
closedset := the empty set // The set of nodes already evaluated.
openset := {start} // The set of tentative nodes to be evaluated, initially containing the start node
came_from := the empty map // The map of navigated nodes.

g_score[start] := 0 // Cost from start along best known path.
h_score[start] := heuristic_cost_estimate(start, goal)
f_score[start] := g_score[start] + h_score[start] // Estimated total cost from start to goal through y.

while openset is not empty
current := the node in openset having the lowest f_score[] value
if current = goal
return reconstruct_path(came_from, came_from[goal])

remove current from openset
add current to closedset
foreach neighbor in neighbor_nodes(current)
if neighbor in closedset
continue
tentative_g_score := g_score[current] + dist_between(current,neighbor)

if neighbor not in openset
add neighbor to openset
h_score[neighbor] := heuristic_cost_estimate(neighbor, goal)
tentative_is_better := true
else if tentative_g_score < g_score[neighbor]
tentative_is_better := true
else
tentative_is_better := false

if tentative_is_better = true
came_from[neighbor] := current
g_score[neighbor] := tentative_g_score
f_score[neighbor] := g_score[neighbor] + h_score[neighbor]

return failure

function reconstruct_path(came_from, current_node)
if came_from[current_node] is set
p := reconstruct_path(came_from, came_from[current_node])
return (p + current_node)
else
return current_node



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-04 23:20:24

Abel Gancsos
fix MMS on jailbroken iPhone

The following information should be set in Settings->General->Network Settings->Cellular Data

NOTE: THE FOLLOWING IS SPECIFIC FOR TMOBILE CUSTOMERS

APN: wap.voicestream.com
MMSC []://216.155.174/servlets/mms
MMS Proxy: 216.155.165.50:8080
MMS UA Prof URL: []://www.apple.com/mms/uaprof.rdf //This section is optional



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-04 01:17:18

Abel Gancsos
make rounded corners with css

input{
-webkit-border-radius:10px;
-moz-border-radius:10px;
}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-03-02 22:44:14

Abel Gancsos
fix CC not found on Lion, gcc, c not found, lion, apple, mac

1) Open up XCode
2) Go into [Preferences]
3) Go to [Downloads]
4) Install [Command line tools]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-26 17:39:23

Abel Gancsos
get storage use linux, get storage use in linux, get storage use in unix

cd /;dh -H



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-26 16:13:53

Abel Gancsos
convert video with PHP script

1) Install FFMPEG
2) Set up the following script


echo "Input: " . $input."
";
echo "Output: " . $output . "
";
echo "Directory: ".$currentD ."
";

echo "Converting your file now....

";

if ($handle = opendir($currentD)) {
$cmd="ffmpeg -i ". $input . " ". $output;

$return1=system($cmd);
closedir($handle);
}

echo "Convert is complete....";
echo $return1;

?>




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-26 13:08:21

Abel Gancsos
check PayPal subscriptions

1) Log into PayPal
2) Click on [Profile]
3) Click on [More Options]
4) Look for [My pre approved payments]
5) Click [Update]

NOTE: FROM HERE, YOU CAN CONTINUE TO KEEP THAT SUBSCRIPTION OR CANCEL IT



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-26 00:00:00

Abel Gancsos
replace, replace desktop monitor, , replace monitor, replace 25" desktop lcd monitor,cleaner damaged lcd monitor screen,repair lcd monitor

First let's look at the two main ways:

A) Replace the screen/glass

1) This is if you broke the glass
2) This does happen
3) Any technician and just the process is more expensive than just getting a new monitor

B) Replacing the whole monitor

1) It's new and untouched, in most cases
2) More cost-effective

To replace a monitor:

1) Pick your budget

NOTE: MOST MONITORS ARE FROM $100-$400, DEPENDING ON BRAND AND SIZE

2) Pick your size
3) Pick your brand

TIP: IF THE BRAND IS MORE IMPORTANT THAN THE SIZE, THEN SOMETIMES YOU WOULD HAVE TO PICK ONE SIZE SMALLER TO STAY IN YOUR BUDGET

4) Pick where you want to purchase it

NOTE: I SUGGEST EITHER BEST BUY, TARGET, EGG.COM,TIGERDIRECT.COM OR EBAY BECAUSE THEY ARE MOST COST EFFECTIVE AND HAVE BETTER CHOICES

NOTE: STAY AWAY FROM CRAIGS LIST
NOTE: STAPLES IS OKAY, IF THE HAVE...

5) When you get it, simply recycle the old one and put the new one in

NOTE: I AM A STRONG SUPPORTER OF RECYCLING WHEN POSSIBLE, SO TRY TO FIND A RECYCLING CENTER OR GIVE IT TOO SOMEONE WHO DOES

Hope that helps!

2012-02-24 17:59:14

Abel Gancsos
detect browser with javascript

var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i=0;i var dataString = data[i].string;
var dataProp = data[i].prop;
this.versionSearchString = data[i].versionSearch || data[i].identity;
if (dataString) {
if (dataString.indexOf(data[i].subString) != -1)
return data[i].identity;
}
else if (dataProp)
return data[i].identity;
}
},
searchVersion: function (dataString) {
var index = dataString.indexOf(this.versionSearchString);
if (index == -1) return;
return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
},
dataBrowser: [
{
string: navigator.userAgent,
subString: "Chrome",
identity: "Chrome"
},
{ string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
},
{
string: navigator.vendor,
subString: "Apple",
identity: "Safari",
versionSearch: "Version"
},
{
prop: window.opera,
identity: "Opera",
versionSearch: "Version"
},
{
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
},
{
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
},
{
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
},
{
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
},
{ // for newer Netscapes (6+)
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
},
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
},
{
string: navigator.userAgent,
subString: "Gecko",
identity: "Mozilla",
versionSearch: "rv"
},
{ // for older Netscapes (4-)
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}
],
dataOS : [
{
string: navigator.platform,
subString: "Win",
identity: "Windows"
},
{
string: navigator.platform,
subString: "Mac",
identity: "Mac"
},
{
string: navigator.userAgent,
subString: "iPhone",
identity: "iPhone/iPod"
},
{
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}
]

};
BrowserDetect.init();



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-24 01:55:57

Abel Gancsos
include external page using Javascript

1) First add this function for parsing purposes

function HttpRequest(url){
var pageRequest = false //variable to hold ajax object
/*@cc_on
@if (@_jscript_version >= 5)
try {
pageRequest = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try {
pageRequest = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e2){
pageRequest = false
}
}
@end
@*/

if (!pageRequest && typeof XMLHttpRequest != 'undefined')
pageRequest = new XMLHttpRequest()
return pageRequest
}

2) Then add this function to include the page

function HttpRequest(url){
var pageRequest = false //variable to hold ajax object
/*@cc_on
@if (@_jscript_version >= 5)
try {
pageRequest = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try {
pageRequest = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e2){
pageRequest = false
}
}
@end
@*/

if (!pageRequest && typeof XMLHttpRequest != 'undefined')
pageRequest = new XMLHttpRequest()

if (pageRequest){ //if pageRequest is not false
pageRequest.open('GET', url, false) //get page synchronously
pageRequest.send(null)
embedpage(pageRequest)
}
}

function embedpage(request){
//if viewing page offline or the document was successfully retrieved online (status code=2000)
if (window.location.href.indexOf("http")==-1 || request.status==200)
document.write(request.responseText)
}



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-23 16:08:10

Abel Gancsos
fix too many redirects error

1) Remove the .htaccess file from the root directory
2) Restart Apache



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-23 13:42:14

Abel Gancsos
enable .htaccess

1) Add this line to the very top of the httpd.conf file: AccessFileName .htaccess

2) Change allowoverride to ALL

3) Save changes

4) Restart apache



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-22 13:26:09

Abel Gancsos
use ffmpeg to convert videos

OGG/Theora

ffmpeg -i input.mov \
-acodec libvorbis -ac 2 -ab 96k -ar 44100 \
-b 345k -s 640x360 output.ogv

WebM/vp8

ffmpeg -i input.mov \
-acodec libvorbis -ac 2 -ab 96k -ar 44100 \
-b 345k -s 640x360 output.webm

MP4/h264

ffmpeg -i input.mov \
-acodec libfaac -ab 96k \
-vcodec libx264 -vpre slower -vpre main \
-level 21 -refs 2 -b 345k -bt 345k \
-threads 0 -s 640x360 output.mp4





TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-21 00:20:21

Abel Gancsos
go into fullscreen in vlc

///Mac

[Command] + [F] AT THE SAME TIME

////Windows

Double click



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-20 17:04:23

Abel Gancsos
program a verizon remote, fios, program a verizon fios remote

1) Turn on device
2) Press and hold BOTH device button and okay
3) Release both buttons
4) Put in code
5) Press okay to save



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-17 01:57:19

Abel Gancsos
activate account with Zonomi, dns

[]://zonomi.com/app/cp/activate.jsp



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-17 01:12:30

Abel Gancsos
make first character of string uppercase in PHP

ucfirst([string])



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-16 23:24:00

Abel Gancsos
edit max upload size, php, apache2

1) sudo pico /etc/php5/apache2/php.ini
2) Look for max_file_size
3) Change to desired
4) Exit pico



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-16 22:57:07

Abel Gancsos
make an alias in Linux or unix, symlink

ln -sd



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-16 05:06:22

Abel Gancsos
install a package in Ubuntu Server

1) Get the file via wget

NOTE: MAKE SURE YOU DOWNLOAD THE TAR.GZ VERSION

2) Unzip the package via gzip

TIP: gzip -cd [package].tar.gz | tar xvf -

3) Go into that directory via cd
4) Run ./setup.sh under sudo




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 21:48:49

Abel Gancsos
create a nice depiction for Cydia

Add the following between the head tags:







TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 20:18:10

Abel Gancsos
Cydia invalid signatures error, jailbreak

1) Remove all entries for that repo in private/etc/apt/sources.list.d
2) Remove all entries for that repo in var/lib/apt/lists
3) Remove all entries for that repo in var/lib/apt/lists/partial
4) Respring iDevice
5) Reboot iDevice



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 14:06:46

Abel Gancsos
install wget on Mac

1) Open up [Terminal]
2) Type in curl -O []://ftp.gnu.org/gnu/wget/wget-1.13.1.tar.gz
3) Unzip using tar xzvf wget-1.13.tar.gz
4) Run cd wget-1.13;.configure
5) Run make
6) Run sudo make install

NOTE: IF IT FAILS THE FIRST TIME, YOU MUST INSTALL MAKE CLEAN BEFORE RUNNING MAKE



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 03:13:56

Abel Gancsos
get user in bashrc file, unix, mac, apple

\u



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 03:12:57

Abel Gancsos
Ubuntu, change prompt, change prompt in ubuntu

1) pico /etc/bashrc
2) Add PS=[prompt] at the end of the file

Hope that helps!


2012-02-15 01:22:15

Abel Gancsos
put a webpage into an iPhone application, iphone development,objective-c

1) Make the uiwebview in the .h

2) Put the following into the didload function:

//Create a URL object.
NSURL *url = [NSURL URLWithString:@"[url]"];

//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.
[[viewname] loadRequest:requestObj];



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-15 00:50:01

Abel Gancsos
print a nice timezone in php


function tz(){

return date("D, M d, o H:i:s");
}


?>



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-13 15:16:59

Abel Gancsos
type a copyright symbol on a Mac, Apple

[option] + [G] AT THE SAME TIME



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-13 02:09:02

Abel Gancsos
import a second page with PHP

Add the following where the second page content should start:

require([path to page]);
?>



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-13 01:47:43

Abel Gancsos
get user browser with Javascript

var browser=navigator.appName;



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-13 01:46:30

Abel Gancsos
get user operating system with javascript

var os=navigator.appVersion;




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-13 01:45:40

Abel Gancsos
fix automatic refreshing tabs in lion

1) Click [Safari]
2) Click [Properties]
3) Click [Security tab
4) Uncheck [Enable Java]



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-11 00:28:59

Abel Gancsos
mysql, server, database

add the following to the bootup file: cd /usr/local/mysql ; (./bin/safe_mysqld || ./bin/mysqld_safe) &

You can call that command (under sudo) any time to start MySQL



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-08 23:30:54

Abel Gancsos
make a transparent image, Mac, Apple

A: Gimp
1) Get Gimp
2) Open up image with gimp
3) Add an alpha channel via [Layer]/[Transparency]/[Add alpha channel]
4) Select the fuzzy selector tool
5) Double click image
6) Click [Edit]
7) Click [Clear]
8) Save


B: Seashore
1) Get Seashore
2) Open image with seashore
3) Enable alpha channel via [Layer]/[Enable alpha channel]
4) Select the fuzzy selector tool
5) Double click image
6) Click [Edit]->[Delete]
7) Save

TIP: SEASHORE TENDS TO BE A FASTER AND MORE COMPACT PROGRAM
NOTE: SEASHORE IS ALSO A LOT EASIER TO USE






TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-07 17:18:07

Abel Gancsos
speed up Lion

1) Repair permissions via Disk Utility
2) Clear /Library/Caches folder (hidden add a "~" in the front)
3) Clear your System Management Controller (SMC) by holding down the Option-Command-Shift and Power button for 10 seconds then release them



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-07 11:41:27

Abel Gancsos
disable hard drive motion sensor on Mac

sudo pmset

NOTE: YOU CAN ENABLE BY RUNNING THE SAME COMMAND IN TERMINAL
NOTE: IT IS NOT ADVISED TO DO THIS BECAUSE THIS PROTECT THE HARD DRIVE



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!

2012-02-05 21:22:27

Abel Gancsos
disable textarea resize