Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Codzing

Jovial Joe Jayarson joe733

💻
Codzing
View GitHub Profile
@joe733
joe733 / forms.py
Created Aug 25, 2021
django survey
View forms.py
# from json import load
from django import forms
from django.forms import fields
from .models import Survey, questions
form_fields = []
answers = q_atrb = dict()
# with open(file="survey/assets/questions.json", mode='r', encoding="utf-8") as jfp:
# questions = load(jfp)
@joe733
joe733 / emulator-install-using-avdmanager.md
Created Jun 8, 2021 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)
View emulator-install-using-avdmanager.md

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@joe733
joe733 / nginxproxy.md
Created Sep 7, 2020 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@joe733
joe733 / nginx-tuning.md
Created Sep 7, 2020 — forked from denji/nginx-tuning.md
NGINX tuning for best performance
View nginx-tuning.md

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@joe733
joe733 / hashcash.py
Created Sep 6, 2020 — forked from i3visio/hashcash.py
hashcash.py is a clean implementation of a "proof of work" library for Python.
View hashcash.py
# ----------------------------------------------
# hashcash.py: Hashcash implementation
# ----------------------------------------------
"""
Hashcash is a "proof of work."
Example:
>>> import sha
>>> sha.new('denmark2890CF').hexdigest() '000000cf89643370c24e413ec0886ab92bd7f6e8'
@joe733
joe733 / id1.dart
Created Jun 2, 2020 — forked from RodBr/id1.dart
Inject Dependencies
View id1.dart
import 'package:flutter/material.dart';
import 'package:get/get.dart'; //STEP 1 - import Get
void main() {
//STEP 3 - add our services - immediate or lazy
Get.put(TestService());
Get.lazyPut<AuthService>(() => AuthService());
runApp(MyApp());
}