Skip to content

Instantly share code, notes, and snippets.

View bluemix's full-sized avatar
🖐️
Hello There :D

Abdulmomen Bsruki bluemix

🖐️
Hello There :D
View GitHub Profile
@darkr4y
darkr4y / httpsrv.py
Last active May 2, 2024 20:42
python simple http server with upload & download
#!/usr/bin/env python
"""Extend Python's built in HTTP server to save files
curl or wget can be used to send files with options similar to the following
curl -X PUT --upload-file somefile.txt http://localhost:8000
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt
__Note__: curl automatically appends the filename onto the end of the URL so
@ErikHellman
ErikHellman / LoginScreenWithCompose.kt
Created December 16, 2019 17:51
A simple demo of using Jetpack Compose to build a Login screen
package se.hellsoft.jetpackcomposeintro
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.Composable
import androidx.compose.Model
import androidx.compose.state
import androidx.compose.unaryPlus
import androidx.ui.core.*
import androidx.ui.foundation.shape.border.Border
@uuklanger
uuklanger / howto_setup_pylint_with_pycharm.md
Last active May 7, 2024 14:23
HOWTO - Setup pylint with PyCharm and the PyLint Plugin

Overivew

Setting up a linter can help detect odd or non-typical coding practices. The following will describe how to setup PyCharm for basic linting with the PyCharm PyLint plugin.

This assumes you have a venv setup within your current project.

Install Pylint

For pylint for your current project venv the following two commands should be run in your project root. The first will install pylint and the second will create an rc file which you can then adjust for your current project.

@ppa-odoo
ppa-odoo / templates_inherit_demo
Last active December 19, 2023 13:06
Odoo: How to inherit <templates> of web module?
REF LINK: https://www.odoo.com/forum/help-1/question/odoo10-how-to-inherit-templates-of-web-module-119140#answer-119142
This is main template:
<template id="template" xml:space="preserve">
<t t-name="DemoExample">
<div class="demo-one">
<p>odoo</p>
</div>
</t>
@brianegan
brianegan / main.dart
Created February 9, 2019 12:22
SetState example not rerendering after each statement
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
Roots for record 0 (stored at leaf 0): [ 0 ]
0: 0
Roots for record 1 (stored at leaf 2): [ 1 ]
0: 0─┐
1
1: 2─┘
Roots for record 2 (stored at leaf 4): [ 1, 4 ]
0: 0─┐
@cellularmitosis
cellularmitosis / EmojiPointersDemo.swift
Created August 15, 2018 18:11
Representing pointer values as emoji can be useful for "visually" debugging certain issues, like cell reuse, etc.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
@ffeu
ffeu / main.dart
Created August 3, 2018 00:18
Flutter Main Example with StreamBuilder
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@Blasanka
Blasanka / main.dart
Created July 2, 2018 06:03
This is a very long text used to demonstrate how to wrap text inside a Column or Row widget. And also to show how to add another row of icon button next to these text widget without going overflow and be center of text widget in main axis
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'LogIn n SignUp',
theme: ThemeData(
@slightfoot
slightfoot / appbar_demo.dart
Created July 2, 2018 01:50
Demonstrate how to change the AppBar from within a PageView.
import 'package:flutter/material.dart';
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primaryColor: Colors.green[900],