Skip to content

Instantly share code, notes, and snippets.

@imsmo
imsmo / Android app launch required image size
Created September 10, 2021 06:52
Android app launch required image size
App icon
32-bit PNG (with alpha)
Dimensions: 512px by 512px
Maximum file size: 1024KB
Feature graphic
JPEG or 24-bit PNG (no alpha)
Dimensions: 1024px by 500px
Promo
@imsmo
imsmo / s3 Bucket image move from EFS or instace Folder
Created April 3, 2021 18:38
s3 Bucket image move from EFS or instace Folder
Step 1: ssh login into bastion/instance host
Step 2: Move to folder path Like: cd /opt/efs/
Step 3: Run this command
Sample 1
aws s3 sync banner/ s3://gamtoss-image/web/uploads/images/banner/
Sample 2
aws s3 sync player/ s3://gamtoss-image/web/uploads/images/player/
@imsmo
imsmo / MySql Query for get mix data from different table
Last active February 26, 2021 12:26
MySql Query for get mix data from different table
=================================================================================================================
CONTEST GROUP BY TYPE QUERY:
SELECT Z.id, Z.match_log_id, Z.contest_type_id, Z.reference_code, Z.visibility, Z.contest_created_by, Z.prize_pool_text, Z.total_pool_prize, Z.entry_fee, Z.total_spot, Z.total_winner_in_percentage, Z.total_winner_team, Z.total_winner_team AS total_winner, Z.entry_type, Z.no_of_team_per_user_join, Z.is_confirmed_contest, Z.usable_cash_bonus_percentage
, Z.contest_short_description, Z.first_prize, Z.contest_name, Z.total_join_spot, Z.user_joined_team
FROM (
SELECT X.*, (@num := if(@group = X.contest_type_id, @num +1, if(@group := X.contest_type_id, 1, 1))) row_number
FROM (SELECT
mc.id, mc.match_log_id, mc.contest_type_id, mc.reference_code, mc.visibility, mc.contest_created_by, mc.prize_pool_text, mc.total_pool_prize, mc.entry_fee, mc.total_spot, mc.total_winner_in_percentage, mc.total_winner_team, mc.total_winner_team AS total_winner, mc.entry_type, mc.no_of_team_per_u
@imsmo
imsmo / Postman Useful Code
Last active April 16, 2020 05:21
Postman Useful Code
//-----------How to set value as a global and local variable from login response start-------
Step1: add this code in "Tests"
pm.test("GetAuthkey", function () {
var jsonData = pm.response.json();
pm.globals.set("globalAuthKey", jsonData.data.auth_key);
pm.environment.set("EnvironmentAuthKey", jsonData.data.auth_key);
});
Note: GetAuthkey: any name you can set,
globalAuthKey: Global variable name as per your choice. For get (pm.globals.set)
EnvironmentAuthKey: Environment variable name as per your choice. For set(pm.environment.set)
@imsmo
imsmo / PHP userful code
Last active March 13, 2020 07:07
PHP userful code
//--------------------------key value pair array setup start----------------------------
$MatchContest = MatchContest::find()->where(['match_log_id'=>$MatchLog->id])->orderBy(['id'=>SORT_ASC])->all();
if($MatchContest)
{
$temp_data = [];
foreach ($MatchContest as $key => $contest){
$temp_data[$contest->contestType->name][] = $this->SetContestData($contest);
}
$i =0;
foreach ($temp_data as $key =>$value){
@imsmo
imsmo / Life usefull things
Last active March 4, 2020 12:51
Life usefull things
- Vambh nakhavi (etle dhor ne ubha karva mate je boliye te)
- Madal Lutavavu (charan k barot aave and badhi bhensone pat(madnama) besadvani and sathe ek pado hoy and vambh nakhe te vakhate pada pela jetli bhens ubhi thay te charan k barot ni means k pado endhanima)
- Lakhansi Gadhavi jagat na pat ma je satya che te: https://www.youtube.com/watch?v=A3tzjpxWLO4&t=330
@imsmo
imsmo / System Useful things
Last active March 9, 2020 09:52
System Useful things
=> Send Youtube link with selected time
https://www.youtube.com/watch?v=h3Ae0V1RQHM&t=70
=>AdminTemplate zmdi movement
https://zavoloklom.github.io/material-design-iconic-font/examples.html
=>PHP Interview Question & Answer
https://www.guru99.com/php-interview-questions-answers.html
@imsmo
imsmo / Sublime Regex
Created December 20, 2019 05:39
Sublime Regex
1. Example: "This is just\na simple sentence".
I want to match every character between "This is" and "sentence". Line breaks should be ignored. I can't figure out the correct syntax.
Regex: (?<=This is)(.*)(?=sentence)
@imsmo
imsmo / WD-Harddisk-Passport-Unlock-Linux
Last active July 10, 2022 16:08
Unlocking WD Passport Hard Disk on Linux/ Ubuntu Operating System
Steps to follow:
1. Open Terminal
2. Type Command : dmesg | grep -i scsi (This will provide your WD Passport drive name)
Example : In my case its "sdb" (See the line [sdb] Attached SCSI disk above the WD My Passport)
3 Download the code zip file: https://github.com/geekhaidar/WD-Passport-Unlock-Linux
4. Unzip the files downloaded in the Download folder
@imsmo
imsmo / Best Design Link
Last active December 5, 2019 05:21
Best Design Link for referance