Skip to content

Instantly share code, notes, and snippets.

View lifeparticle's full-sized avatar
🥥
0, 1, 2, 3…

Mahbub Zaman lifeparticle

🥥
0, 1, 2, 3…
View GitHub Profile
name: Build Json
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
from http.server import BaseHTTPRequestHandler
from urllib import parse
import psycopg2
import json
import os
class handler(BaseHTTPRequestHandler):
def do_GET(self):
connection = psycopg2.connect (
https://codelabs.developers.google.com/codelabs/android-room-with-a-view/#0
https://github.com/googlecodelabs/android-room-with-a-view
https://stackoverflow.com/questions/8784249/android-autocompletetextview-with-custom-adapter-filtering-not-working/8784931
Icons:
https://material.io/resources/icons/?style=baseline
#!/bin/bash
# <bitbar.title>Sunrise and sunset time</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>S Mahbub-Uz Zaman</bitbar.author>
# <bitbar.author.github>lifeparticle</bitbar.author.github>
# <bitbar.desc>Sunrise and sunset time</bitbar.desc>
# <bitbar.image></bitbar.image>
# <bitbar.dependencies></bitbar.dependencies>
# <bitbar.abouturl></bitbar.abouturl>
@lifeparticle
lifeparticle / cus_view.xml
Created November 7, 2015 17:19
apply layout_weight in a xml object so that it will have 20% of height and 80% of width
/**
* Author S Mahbub-Uz Zaman on November 8, 2015
* Lisence Under GPL2
*/
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
/**
* Author S Mahbub-Uz Zaman on October 23, 2015
* Lisence Under GPL2
*/
public static String monthNames[] = {"January", "February", "March", "April",
"May", "June", "July", "August", "September", "October",
"November", "December"};
// input 17/06/1991
@lifeparticle
lifeparticle / LICENSE
Last active February 9, 2023 11:22
Custom Edittext with Line Number
MIT License
Copyright (c) 2023 Mahbub Zaman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@lifeparticle
lifeparticle / replace.java
Created April 13, 2015 22:21
Replace last occurrence of Character in a String using Java
// beta
// Lisence Under GPL2
// Author: S.Mahbub-Uz-Zaman
public static String a = "test,test,test";
public static String replaceWith = " and ";
// using StringBuffer's replace method
public static void replaceLastCommaSB () {
StringBuffer sb = new StringBuffer(a);