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
# Source: http://cocoapods.org | |
gem install cocoapods |
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 | |
cd /Applications/Android\ Studio.app/sdk/platform-tools | |
clear | |
read -p "Enter device IP address: " ip | |
./adb connect $ip |
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
private boolean checkForInternetConnection() { | |
Boolean internetIsAvailable = false; | |
//check for internet connection | |
try { | |
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); | |
} catch (Exception e) { | |
Log.d(TAG, "checkForInternetConnection Exception", e); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
void openWhatsappContact(String number) { | |
Uri uri = Uri.parse("smsto:" + number); | |
Intent i = new Intent(Intent.ACTION_SENDTO, uri); | |
i.setPackage("com.whatsapp"); | |
startActivity(Intent.createChooser(i, "")); | |
} |
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
<?php | |
<!-- Logout and redirect to home --> | |
echo wp_logout_url( home_url() ); | |
<!-- Get Page Title --> | |
echo get_the_title(); | |
<!-- Redirect --> | |
wp_redirect(''); |
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
UPDATE `database`.`wp_options` SET `option_value` = 'http://localhost/wp' WHERE `wp_options`.`option_id` = 1; | |
UPDATE `database`.`wp_options` SET `option_value` = 'http://localhost/wp' WHERE `wp_options`.`option_id` = 2; |
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
SqlConnection con = new SqlConnection(); | |
SqlCommand cmd = new SqlCommand(); | |
cmd.Connection=con; | |
cmd.CommandType=CommandType.Text; | |
cmd.CommandText="select column from table where condition;"; |
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
/** | |
**================================================================================================================** | |
* Rewrite Root Rules | |
**================================================================================================================** | |
**================================================================================================================** | |
**/ | |
add_action('generate_rewrite_rules', 'roots_add_rewrites'); | |
function roots_add_rewrites($content) { | |
$theme_name = next(explode('/themes/', get_stylesheet_directory())); | |
global $wp_rewrite; |
OlderNewer