Skip to content

Instantly share code, notes, and snippets.

Avatar
Expecto Patronum!

Nishan Chathuranga Wickramarathna nishanc

Expecto Patronum!
View GitHub Profile
View companies.json
[
{
"name": "Reticulated Giraffe",
"species": "Giraffa camelopardalis reticulata",
"description": "The reticulated giraffe (Giraffa camelopardalis reticulata), also known as the Somali giraffe, is a subspecies of giraffe native to Somalia, southern Ethiopia, and northern Kenya. Reticulated giraffes can interbreed with other giraffe subspecies in captivity or if they come into contact with populations of other subspecies in the wild. \nThe reticulated giraffe is among the most well-known of the nine giraffe subspecies. Together with the Rothschild giraffe, it is by far the giraffe most commonly seen in zoos. Its coat consists of large, polygonal, liver-colored spots outlined by a network of bright-white lines. The blocks may sometimes appear deep red and may also cover the legs. The extraordinary height of giraffes is attributed to a ritual known as \"necking\", where two males fight for reproduction rights by slamming their necks into one another. The giraffes with the tallest and
View UpdateFork.txt
---------------------------------------------------Section 1---------------------------------------------------
//Add upstream url to original repository
git remote add upstream https://github.com/99xt-incubator/skype-notifier-bot.git
//Check if both origin and upstream urls are there
git remote -v
# This should give following outputs
# origin https://github.com/<username>/skype-notifier-bot (fetch)
# origin hhttps://github.com/<username>/skype-notifier-bot (push)
# upstram https://github.com/99xt-incubator/skype-notifier-bot.git (fetch)
View DataContext.cs
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using MySql.Data.Entity;
namespace MySQLCodeFirst.Models
{
[DbConfigurationType(typeof(MySqlEFConfiguration))]
View Web.config
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
View IdentityModels.cs
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.Migrations.History;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using MySql.Data.Entity;
View loader-script.js
var loader;
function loadNow(opacity) {
if (opacity <= 0) {
displayContent();
} else {
loader.style.opacity = opacity;
window.setTimeout(function() {
loadNow(opacity - 0.05);
}, 50);
View loader-css.css
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
background: url(background.jpg) no-repeat 50% 50%;
background-size: cover;
}
#loader {
View index.html
<html>
<head>
<link rel = "stylesheet" type = "text/css" href = "style.css" />
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<div id="loader"></div>
<div id="content">
<h1>WELCOME TO MY WEBSITE</h1>
</div>
View DataContext.cs
using JWTAuth.API.Models;
using Microsoft.EntityFrameworkCore;
namespace JWTAuth.API.Data
{
public class DataContext : DbContext
{
public DataContext(DbContextOptions<DataContext> options) : base(options) {}
public DbSet<Value> Values { get; set; }
}
View appsettings.json
{
"ConnectionStrings":{
"DefaultConnection":"Server=.;Database=JWTAuthDB;Trusted_Connection=True;ConnectRetryCount=0"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}