Skip to content

Instantly share code, notes, and snippets.

View Chukslord1's full-sized avatar
🏠
Working from home

Chukslord Chukslord1

🏠
Working from home
View GitHub Profile
@Chukslord1
Chukslord1 / urls.py
Created July 31, 2021 13:34
Agora Video Application -Setting the Channel
channel=""
app_id='replace_with_app_id'
if Channel.objects.filter(app_id=app_id):
channel=Channel.objects.filter(app_id=app_id).last().channel
@Chukslord1
Chukslord1 / models.py
Last active July 31, 2021 13:29
Agora Video Application
class Meeting(models.Model):
channel = models.TextField()
meeting_title = models.TextField(null=True,blank=True)
meeting_subject = models.TextField(null=True,blank=True)
start_time = models.TimeField(null=True,blank=True)
end_time = models.TimeField(null=True,blank=True)
date = models.DateField(null=True,blank=True)
class Channel(models.Model):
channel = models.TextField()
@Chukslord1
Chukslord1 / Opportunities.txt
Created April 14, 2021 13:56
A list of opportunities for women
*Here are 15 Grants & Grant Resources specifically set up for Women in various fields.*
1. Global Fund for Women
Link to Apply: tinyurl.com/9847t2ak
2. African Women Development Fund
Link to Apply: tinyurl.com/xjczdnwj
3. International Centre for Women Playwrights
Link to Apply: tinyurl.com/3aun3mn8

Starting a Conversation with BotFather

Go to your telegram account, then search for @botfather and start a conversation with the account.

Creating the Telegram Bot Interface with BotFather

Use the /newbot command to create a new Telegram Bot. To create a bot using BotFather, you need to give your bot a name and assign a username.

After supplying the name and username for your Telegram Bot, the system will provide you with the API token that you can use to interact with the Bot account via the Telegram API.Copy and paste the API token somewhere safe.

@Chukslord1
Chukslord1 / create_api_key.md
Created April 5, 2021 21:14
create_api_key

For your python app to interact with fauna, you need to create an API key for the database. To do this, go to the security tab on the left side of your screen.

Click on New Key to generate a secret key. To create the key, you will need to provide a name for your key and save it. Your secret key will now be displayed to you, as seen in the image below. Copy and paste it somewhere you can easily retrieve it.

@Chukslord1
Chukslord1 / create_index_instructions.md
Last active May 2, 2021 16:47
Instructions for creating indexes

To create indexes, go to the DB Overview tab on the left side of your screen, then click on the New Index button.

We will create three indexes for the database, users_index, appointment_index, and appointment_today_index. The users_index index will enable you to scroll through data in the Users collection using the id field as a parameter to match. The appointment_index index will enable you to scroll through data in the Appointments collection using the user_id field as a parameter to match. The appointment_today_index index will allow you to scroll through data in the Appointments collection. It will use the user_id and date_due fields as parameters to match.

After clicking on the New Index button, you need to select the collection you want to connect to this index. Choose the collection, enter a name for your index, terms for your index, and values. Ticking the Unique checkbox ensures the data entered for the term is unique. The terms field specifies what data you wan

To create a collection, click on CREATE COLLECTION then provide information for the required fields. It will require you to enter the name of the collection, the History Days and TTL. The History Days field refers to the number of days you want Fauna to keep a historical record of any data in that collection. The TTL refers to an expiry date for data in the collection. For example, if the TTL is 3, Fauna will auto-delete any data stored in the database three days after the last date you modified it. After saving the collections you just created, you will notice there are no documents in your collections. A document is like rows of data in a table as in a relational database system.

@Chukslord1
Chukslord1 / style.css
Created February 9, 2021 04:07
fauna appointment scheduler django (style.css file)/login folder
body {
background-color: #F3EBF6;
font-family: 'Ubuntu', sans-serif;
}
.main {
background-color: #FFFFFF;
width: 400px;
height: 400px;
margin: 7em auto;
@Chukslord1
Chukslord1 / style.css
Created February 9, 2021 04:03
fauna appointment scheduler django (style.css file)
body{
background: url(http://www.timurtek.com/wp-content/uploads/2014/10/form-bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-family:'HelveticaNeue','Arial', sans-serif;
}
a{color:#58bff6;text-decoration: none;}
@Chukslord1
Chukslord1 / script.js
Created February 9, 2021 03:56
fauna appointment scheduler app with django (javascript file)
$(document).ready(function(){
var formInputs = $('input[type="email"],input[type="password"]');
formInputs.focus(function() {
$(this).parent().children('p.formLabel').addClass('formTop');
$('div#formWrapper').addClass('darken-bg');
$('div.logo').addClass('logo-active');
});
formInputs.focusout(function() {
if ($.trim($(this).val()).length == 0){
$(this).parent().children('p.formLabel').removeClass('formTop');