Skip to content

Instantly share code, notes, and snippets.

View kazemihabib's full-sized avatar

Habib Kazemi kazemihabib

View GitHub Profile
This file has been truncated, but you can view the full file.
n.vlc.debug activity: org.videolan.vlc.gui.SecondaryActivity@b89415
2021-04-14 15:30:09.435 20660-20660/org.videolan.vlc.debug I/chatty: uid=10343(org.videolan.vlc.debug) main identical 3 lines
2021-04-14 15:30:09.435 20660-20660/org.videolan.vlc.debug D/ForceDarkHelper: updateByCheckExcludeList: pkg: org.videolan.vlc.debug activity: org.videolan.vlc.gui.SecondaryActivity@b89415
2021-04-14 15:30:09.436 20660-20660/org.videolan.vlc.debug W/SingleEvent: Multiple observers registered but only one will be notified of changes.
2021-04-14 15:30:09.437 20660-20660/org.videolan.vlc.debug D/ForceDarkHelper: updateByCheckExcludeList: pkg: org.videolan.vlc.debug activity: org.videolan.vlc.gui.SecondaryActivity@b89415
2021-04-14 15:30:09.437 20660-20660/org.videolan.vlc.debug D/ForceDarkHelper: updateByCheckExcludeList: pkg: org.videolan.vlc.debug activity: org.videolan.vlc.gui.SecondaryActivity@b89415
2021-04-14 15:30:09.438 20660-20660/org.videolan.vlc.debug I/AppCompatViewInflater: app:theme is now deprecated. Please
@kazemihabib
kazemihabib / ExpandCollapseButton.kt
Created May 1, 2020 16:46 — forked from pt2121/ExpandCollapseButton.kt
Android Jetpack Compose caret animation
/*
* Copyright 2020 Prat Tana. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
@kazemihabib
kazemihabib / DrawLayerSolarSystem.kt
Last active January 10, 2024 14:06
Jetpack compose Solar system animation inside Interactive drawLayer based on https://gist.github.com/zach-klippenstein/e2c8e6edf0d950d8ba527cd0681c5b60
//image earth: https://media.prod.mdn.mozit.cloud/attachments/2012/07/09/1429/e2d55b8d5c9efd75a12112264d4ac091/Canvas_earth.png
//image sun: https://www.extremetech.com/wp-content/uploads/2020/01/NASA-Sun-640x611.jpg (scaled down to 20%)
//image sky: https://unblast.com/wp-content/uploads/2018/10/Sky-Stars-Pattern-1600x1190.jpg
import androidx.animation.*
import androidx.animation.Spring.DampingRatioHighBouncy
import androidx.animation.Spring.StiffnessLow
import androidx.compose.Composable
import androidx.compose.Model
import androidx.compose.remember
import androidx.ui.animation.Transition
@kazemihabib
kazemihabib / gist:848e5474dd4ed21e6c9574f3eb1b7de4
Created April 11, 2020 10:53
shortcut for a gui application from wsl in windows 10
C:\Windows\System32\bash.exe ~ -c "cd /mnt/c/users/habib/music/dic/; DISPLAY=localhost:0.0 python3 ~/apps/ldoce5viewer-pyqt5/ldoce5viewer.py"
@kazemihabib
kazemihabib / AudioRecordView.kt
Last active January 9, 2020 21:33
Use kotlin, livedata, databinding with AudioRecordView
// DON't forget this, otherwise it won't work
// In your activity
binding.lifecycleOwner = this
// create a binding adapter
@BindingAdapter("update")
fun setAmplitude(audioRecordView: AudioRecordView, data: Int) {
if (data == -1) audioRecordView.recreate()
else audioRecordView.update(data)
}
@kazemihabib
kazemihabib / Install_ldoce5viewer_ubuntu_19.04.txt
Created December 13, 2019 11:57
Install ldoce5viewer ubuntu 19.04
Follow https://askubuntu.com/a/1066810 to install qt5 version.
To fix the sound problem follow
# apt install pyqt5-dev-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly python3-pyqt5.qtmultimedia python3-pyqt5.qtwebkit libqt5multimedia5-plugins
and:
# pip3 install whoosh==2.5.7
(copied from https://github.com/ciscorn/ldoce5viewer/issues/47#issuecomment-478391492)
@kazemihabib
kazemihabib / gist:b8e02c19916aae325a9d3a21d193324b
Created December 25, 2018 06:32
How to fix Gpu has fallen off the bus when waking up from suspend
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rcutree.rcu_idle_gp_delay=1 acpi_osi=! acpi_osi='Windows 2009'"
sudo update-grub

Show all unread messages: in:inbox is:unread

@kazemihabib
kazemihabib / gist:0b983c92fcc785988ea651bdb3b152fd
Created May 21, 2018 18:11
How to create Transparent window in pyGtk
https://stackoverflow.com/a/33294727/4146943
https://stackoverflow.com/a/19800058/4146943
@kazemihabib
kazemihabib / Using Git to Manage a Live Web Site.md
Last active January 6, 2019 12:42 — forked from Nilpo/Using Git to Manage a Live Web Site.md
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents