Skip to content

Instantly share code, notes, and snippets.

View shibli049's full-sized avatar

Tahmim Ahmed Shibli shibli049

View GitHub Profile
@shibli049
shibli049 / mysqldb_python3.sh
Last active April 23, 2023 05:48
Install mysqlclient for python3
#sudo pip3 install mysqlclient fails with mysql_config not found
sudo apt-get install libmysqlclient-dev
#without pip3 it will not going to work for python3
sudo pip3 install mysqlclient
# to run django migration
python3 manage.py migrate
public static boolean isOsWindows() {
String osName = System.getProperty("os.name");
if (osName != null) {
osName = "";
}
return osName.toUpperCase().contains("WINDOWS");
}
class MagicalObject(object):
def __init__(self, num):
self.num = num
def __eq__(self, other):
return type(self.num) == type(other)
class MagicalObject(object):
def __init__(self, num):
self.num = num
def __eq__(self, other):
self.num += 1
return self.num == other
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Which dependency-injection/autowiring option is better, why?
public class SpringAutowire{
@Autowire
private ClassA a;
private ClassB b;
private ClassC c;
@Autowire
public SpringAutowire(ClassB b){

Add swagger2 documentation

Dependencies

  1. io.springfox:springfox-swagger2:2.4.0
  2. io.springfox:springfox-swagger-ui:2.4.0

Configuration

// Place your settings in this file to overwrite default and user settings.
{
"editor.wrappingColumn": 0,
"files.exclude": {
"**/node_modules": {},
"typings": {},
"**/*.map": {},
"**/*.js": {
"when": "$(basename).ts"
}
@shibli049
shibli049 / data.json
Last active November 11, 2019 17:22 — forked from planetoftheweb/data.json
[
{
"name":"Barot Bellingham",
"shortname":"Barot_Bellingham",
"reknown":"Royal Academy of Painting and Sculpture",
"bio":"Barot has just finished his final year at The Royal Academy of Painting and Sculpture, where he excelled in glass etching paintings and portraiture. Hailed as one of the most diverse artists of his generation, Barot is equally as skilled with watercolors as he is with oils, and is just as well-balanced in different subject areas. Barot's collection entitled \"The Un-Collection\" will adorn the walls of Gilbert Hall, depicting his range of skills and sensibilities - all of them, uniquely Barot, yet undeniably different"
},
{
"name":"Jonathan G. Ferrar II",
"shortname":"Jonathan_Ferrar",
@shibli049
shibli049 / git-pushing-multiple.rst
Created June 9, 2018 12:13 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just