Skip to content

Instantly share code, notes, and snippets.

{
"dependencies": {
"textract": {
"version": "2.2.0",
"dependencies": {
"marked": {
"version": "0.3.9"
}
}
}
namespace CascadeDelete.Models
{
public class DataContext: DbContext
{
public virtual DbSet<Resident> Residents { get; set; }
public virtual DbSet<City> Cities { get; set; }
public virtual DbSet<ResidentCityOwn> ResidentCityOwn { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
namespace CascadeDelete.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class Test : DbMigration
{
public override void Up()
{
CreateTable(
@josephhhhh
josephhhhh / deploy.sh
Last active February 22, 2018 21:50
node app deploy heroku bash script
#!/bin/bash
# usage: ./deploy.sh <github_repo> <app_name>
# perform local testing
repo=$1
git clone $repo _repo
cd _repo
npm install
npm test
# Here's an example that shows you can load ntuser.dat manually
# I load the admin ntuser.dat to a new registry hive
# called 'admin_profile' under HKU root hive
#
# syntax: reg load <root key>\<subkey> <path>
# path: C:\Users\<username>\NTUSER.DAT
#
reg load hku\admin_profile c:\users\administrator\ntuser.dat
reg unload admin_profile
$curUserNameStr = $ENV:Username;
$curUser = New-Object System.Security.Principal.NTAccount($curUserNameStr);
$curUserSID = $curUser.Translate([System.Security.Principal.SecurityIdentifier]);
$curUserSIDStr = $curUserSID.Value;
@josephhhhh
josephhhhh / hosts
Last active February 9, 2018 19:11
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost <local_computer_name>
255.255.255.255 broadcasthost
# Add it to the end of your .bashrc as start-up command
source ~/.bash_profile
@josephhhhh
josephhhhh / login.sql
Last active February 9, 2018 19:09
login script for oracle server
SET PAGESIZE 100;
SET LINESIZE 100;
define_editor='vi';
SET SERVEROUTPUT ON;
SET VERIFY OFF;
@josephhhhh
josephhhhh / .bash_profile
Last active February 9, 2018 19:10
for oracle
export ORACLE_HOME="/Applications/oracle/product/instantclient_64"
export PATH=$ORACLE_HOME/bin:$PATH
export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
# Set ORACLE_PATH to the location where you store your custom "login.sql"
export ORACLE_PATH="/Applications/oracle/product/instantclient_64/sqlplus/admin"
alias sqlplus='rlwrap sqlplus'