Skip to content

Instantly share code, notes, and snippets.

View devseevali's full-sized avatar

Seevali Rathnayake devseevali

  • Colombo, Sri Lanka
View GitHub Profile
@kristopherjohnson
kristopherjohnson / SHA1Util.cs
Last active October 1, 2020 22:18
.NET/C# Generate SHA1 hex string for a string encoded as UTF8
using System.Security.Cryptography;
using System.Text;
namespace Snippets
{
public static class SHA1Util
{
/// <summary>
/// Compute hash for string encoded as UTF8
/// </summary>
@dkhenry
dkhenry / play2.service
Created January 6, 2013 21:28
Systemd script for the Play Framework
[Unit]
Description=Play2 Server for <site>
After=network.target
 
[Service]
Type=simple
PIDFile=<path>/RUNNING_PID
 
ExecStartPre=/bin/sh -c 'cd <path> ;/bin/rm RUNNING_PID ; sbt clean compile stage'
ExecStart=<path>/target/start
@sink66
sink66 / setup-taiga-centos.sh
Last active October 1, 2021 13:36
Taiga.io minimum install & run commands / CentOS7.2
#!/bin/bash
# How to use
# 1. Replace the "YOURIP" to yourIP
#sed -i -e 's/YOURIP/192.168.x.x/g' setup-taiga-centos.sh
# 2. Run at the root
#source setup-taiga-centos.sh
@scottsauber
scottsauber / ApplicationDbContext.cs
Last active October 17, 2017 11:27
Customizing EF Core tables using EF Core 2.0+
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public DbSet<OrderItem> OrderItems { get; set; }
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);