Skip to content

Instantly share code, notes, and snippets.

View siumhossain's full-sized avatar
🥱
?

sium_hossain siumhossain

🥱
?
View GitHub Profile
import 'package:get/get.dart';
class MyController extends GetxController{
var count = 0.obs;
void increment(){
count++;
}
}
class Controller extends GetxController{
var count = 0;
void increment(){
count++;
update(['id name']);
}
}
@siumhossain
siumhossain / api_service.dart
Created May 31, 2021 14:04
Getx fetch api reference
import 'package:datarequest/Models/Todomodel.dart';
import 'package:http/http.dart' as http;
class Dataservices {
static var client = http.Client();
static Future<List<Todo>> getTodo() async {
var response =
await client.get('https://jsonplaceholder.typicode.com/todos');
@siumhossain
siumhossain / create.py
Last active June 5, 2021 16:16
django crud view
def lead_create(request):
form = LeadForm()
if request.method == 'POST':
form = LeadForm(request.POST)
if form.is_valid():
form.save()
return redirect('/lead')
context = {
'form':form
}
@siumhossain
siumhossain / class_and_function.py
Created June 7, 2021 05:55
django class and function based view reference
from django.shortcuts import render,redirect
from django.http import HttpResponse
from .models import Lead
from .forms import LeadForm
from django.views.generic import ListView,DetailView,CreateView,UpdateView,DeleteView
from django.urls import reverse
# Create your views here.
@siumhossain
siumhossain / list.html
Created June 9, 2021 05:46
ajax search in django
{% load static %}
<html>
<head>
<link rel="stylesheet" href="{% static 'main.css' %}">
</head>
<body>
<b>
<a href="{% url 'lead:lead_create' %}">
Create lead
@siumhossain
siumhossain / create.html
Last active June 9, 2021 16:04
ajax_from_submission
{% load static %}
<html>
<body>
<b> <a href="{% url 'lead:lead' %}">previous page</a> </b>
<hr>
<b>
Create a lead
</b>
@siumhossain
siumhossain / readme.md
Last active June 16, 2025 21:34
How to install selenium chrome web driver in linux

Download chrome webdriver from

Click here for download

Make sure driver version match your chrome browser version

Open folder where chrome driver downloaded and open terminal & run one by one

sudo chmod +x chromedriver
@siumhossain
siumhossain / sources_list.md
Created June 29, 2021 18:10
Ubuntu source list
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
@siumhossain
siumhossain / solve.md
Last active August 4, 2021 16:25
Kde connect doesn't work after on firewall
sudo apt install gufw

Open gufw from app launcher

Go to the Rules tab

Click the [+] button to add a new rule

Select the direction "Both"