Skip to content

Instantly share code, notes, and snippets.

View siumhossain's full-sized avatar
🥱
?

sium_hossain siumhossain

🥱
?
View GitHub Profile
@siumhossain
siumhossain / 1.html
Created February 6, 2024 08:58
html details
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game - User details</title>
<script src="https://cdn.tailwindcss.com"></script>
<script
defer
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"
@siumhossain
siumhossain / locustfile.py
Last active September 11, 2023 06:29
video streming test
from locust import HttpUser, task, between
import re
class QuickstartUser(HttpUser):
def extract_links(self, response_content):
pattern = r'(/encrypted_video/[^ ]+\.ts)'
links = re.findall(pattern, response_content)
print('links \n',links)
@siumhossain
siumhossain / 1.md
Created July 31, 2023 06:52
Home page data api needed

Banner section

  • Title - example: Let's learn from the experts!
  • short_description - example: Join iou and explore 500+ courses All on demand, all for USD 25/year

Trending Slider Section

  • Title - example: Explore Our Best Trending Course
  • short_description - example: Sub Title Goes Here

University & company collaboration section

  • Title - example: We collaborate with 200+ leading universities and companies
@siumhossain
siumhossain / 1.js
Last active May 29, 2023 07:20
update specific portion of array after submitting post request in next js
const submitComment = async (e, id) => {
e.preventDefault();
const data = {
comment: commentData,
article: id
}
await axios.post(`${process.env.NEXT_PUBLIC_ROOT_URL}/api/v1/article_comment/`, data, {
headers: { Authorization: `Token ${token}` },
})
.then(res => {
@siumhossain
siumhossain / country_information.csv
Created February 2, 2023 19:15
country_name,country_code,timezones(utc),currency,capital,continent,phone-code etc
name code phone-code continent capital currency timezones
Afghanistan AF 93 Asia Kabul Afghani UTC +04:30
Albania AL 355 Europe Tirana Lek UTC +01:00
Algeria DZ 213 Africa Algiers Dinar UTC +01:00
American Samoa AS 1-684 Oceania Pago Pago Dollar UTC -11:00
Andorra AD 376 Europe Andorra la Vella Euro UTC +01:00
Angola AO 244 Africa Luanda Kwanza UTC +01:00
Anguilla AI 1-264 North America The Valley Dollar UTC -04:00
Antarctica AQ 672 Antarctica None None UTC +11:00
Antigua and Barbuda AG 1-268 North America St. John's Dollar UTC -04:00
@siumhossain
siumhossain / 1.md
Created July 25, 2022 05:48
fiex top and bottom anythig css
.fixed-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

.fixed-bottom {
@siumhossain
siumhossain / 1.md
Created July 23, 2022 06:43
kill any running process inside any port in linux (bash terminal)

Check what kind of process running in specific port by

lsof -i:<port_number>
kill $(lsof -i:<port_number>)
@siumhossain
siumhossain / 1.css
Last active July 15, 2022 13:52
css responsive
/* extra small */
/* @media (min-width: 320px) and (max-width: 575px){
} */
/* extra small end*/
/* small device */
/* @media (min-width: 576px) and (max-width: 767px){
} */
@siumhossain
siumhossain / 1.md
Created June 8, 2022 05:27
create link from title

take title valye from product title and put - between space and push to new url

 methods:{
       product(value){
           console.log(value)
           const title = value.title
            const clearTitle = title.replaceAll(' ','-')
            console.log(clearTitle)
            this.$router.push({
 path:`/${clearTitle}/`,
@siumhossain
siumhossain / ex.md
Last active May 14, 2022 09:48
remove under score, remove two slash from both side and remove specific word from start
const route = this.$router.history.current.path
const removeUnderScoretitle = route.split('_').join(' ')
const removeAllSlash = removeUnderScoretitle.replace(/\\|\//g,'')
const title = removeAllSlash.replace('category','')
console.log(title)