⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################## | |
# disable apache # | |
################## | |
service httpd stop | |
chkconfig httpd off | |
service xinetd stop | |
chkconfig xinetd off | |
service saslauthd stop |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Active Internet checker | |
public static boolean isNetworkConnected(Context context) { | |
ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
return (cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isAvailable() && cm.getActiveNetworkInfo().isConnected()); | |
} | |
//check for network activity | |
if(isNetworkConnected(this)){ | |
//Internet is working | |
}else { | |
//Internet is not working |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
Servername lb-test.example.com | |
Redirect / https://lb-test.example.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
Servername lb-test.example.com:443 | |
SSLEngine On | |
SSLCertificateFile /etc/pki/tls/certs/example.com.crt | |
SSLCertificateKeyFile /etc/pki/tls/private/example.com.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#INSTALLING AMANADA | |
yum install -y amanda amanda-client | |
#SETTING UP AMANDA CONFIG | |
su - amandabackup | |
rm -rf /var/lib/amanda/.amandahosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<provider | |
android:name=".providers.AssetProvider" | |
android:authorities="@string/provider_asset" | |
android:multiprocess="true" | |
android:exported="true"/> | |
<provider | |
android:name=".providers.AssetTagProvider" | |
android:authorities="@string/provider_assettags" | |
android:multiprocess="true" |
OlderNewer