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
try { | |
Bitmap bmp = MediaStore.Images.Media.getBitmap( | |
getContentResolver(), photoFileUri); | |
photoViewIV.setImageBitmap(bmp); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} |
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
INSERT INTO spatial_ref_sys values (32800, 'EPSG', 32800, 'PROJCS["Transverse_Mercator",GEOGCS["GCS_unnamed ellipse",DATUM["D_unknown",SPHEROID["Unknown",6377276.345,300.8017000000115]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",7.00048],PARAMETER["central_meridian",80.77171],PARAMETER["scale_factor",0.9999238418],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],UNIT["Meter",1]]', | |
'"+proj=tmerc +lat_0=7.00048 +lon_0=80.77171 +k=0.9999238418 +x_0=200000 +y_0=200000 +a=6377276.345 +b=6356075.41314024 +towgs84=-97,787,86,0,0,0,0 +units=m +no_defs"' | |
) |
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 Symfony\Component\HttpFoundation\StreamedResponse; | |
$response = new StreamedResponse(function() use ($request, $data) { | |
while (true) { | |
echo 'data: ' . json_encode(['data' => $data]) . "\n\n"; | |
ob_flush(); | |
flush(); | |
usleep(10000000); | |
} | |
}); |
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
https://htmlpdfapi.com/blog/free_html5_invoice_templates | |
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
require_once( 'wp-load.php' ); | |
global $wpdb; | |
$sql_1 = "DELETE FROM ".$wpdb->prefix."term_relationships WHERE object_id IN (SELECT ID FROM ".$wpdb->prefix."posts WHERE post_type = 'product');"; | |
$sql_2 = "DELETE FROM ".$wpdb->prefix."postmeta WHERE post_id IN (SELECT ID FROM ".$wpdb->prefix."posts WHERE post_type = 'product');"; | |
$sql_3 = "DELETE FROM ".$wpdb->prefix."posts WHERE post_type = 'product';"; | |
$sql_4 = "DELETE relations.*, taxes.*, terms.* | |
FROM ".$wpdb->prefix."term_relationships AS relations |
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
Manage Security | |
1.Allow HTTP Service theough firewall | |
Open Predefined Service | |
https://www.rootusers.com/how-to-open-a-port-in-centos-7-with-firewalld/ | |
2. Change SSH Port | |
https://www.globo.tech/learning-center/change-ssh-port-centos-7/ | |
3. Disable Root Login | |
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7 |
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
LOAD DATA LOCAL INFILE "C:/Users/xxx/e7849261fe2785926565f6c9c4dea6e957c3c837.csv" | |
INTO TABLE contacts | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
IGNORE 1 ROWS |
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
Format date time using Carbon | |
\Carbon\Carbon::createFromFormat($from, $value)->format($to); | |
\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', '2017-12-10 01:00:00')->format('d/m/Y H:i') | |
Validate & format Carbon date | |
if (! function_exists('carbon_date_or_null_if_zero')) { | |
function convert_datetime_to_carbon($value, $from = 'Y-m-d H:i:s', $to = 'd/m/Y H:i') | |
{ | |
if(empty($value)){ | |
return null; |
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
https://8degreethemes.com/wordpress-themes/ | |
https://www.navthemes.com/free-wordpress-theme/constra/ | |
http://demo.navthemes.com/?demo=plain-blog-theme | |
http://demo.navthemes.com/?demo=truewest-free-multipurpose-wordpress-theme&c=rsOSrXFBK | |
http://demo.mysterythemes.com/owner/ |
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
Generate ssh in web server | |
go to /var/www | |
sudo -u www-data ssh-keygen | |
sudo cat .ssh/id_rsa.pub | |
set this in gitlab deployment keys | |
sudo -u www-data mkdir xxxxxx |
OlderNewer