Skip to content

Instantly share code, notes, and snippets.

@nchammas
nchammas / simple_bank.sql
Created September 9, 2011 22:27
Simple bank schema in T-SQL
-- required SET options for indexed view
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET NUMERIC_ROUNDABORT OFF;
SET QUOTED_IDENTIFIER ON;
SET ARITHABORT ON;
--
@mitchallen
mitchallen / .gitignore_global
Created April 21, 2012 15:27
Example global .gitignore file
####################################################
# Global .gitignore Flle
# Reference: http://help.github.com/ignore-files/
# Save this in a file: ~/.gitignore_global
# Then at the command line (you will see more info if a repo is in the current folder):
# git config --global core.excludesfile ~/.gitignore_global
# git config --list
#####################
# Maven #
@perrygeo
perrygeo / TODO
Last active December 31, 2022 21:24
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio
@chrisyue
chrisyue / pre-commit
Last active November 17, 2017 09:15
pre-commit for php,使用 php -l / phpmd / php-cs-fixer做检查,需要在项目根目录添加phpmd.xml,.php_cs文件
#!/usr/bin/env php
<?php
// 使用 php -l / phpmd / php-cs-fixer做检查,需要在项目根目录添加phpmd.xml(如果使用phpmd),.php_cs(如果使用phpcs并且有自定义的配置)文件
// 使用前执行 chmod +x path/to/pre-commit
exec('git diff HEAD --name-only --diff-filter=AMRC', $filenames);
$filenames = array_filter($filenames, function($filename) {
return pathinfo($filename, PATHINFO_EXTENSION) === 'php';
@derhuerst
derhuerst / intro.md
Last active July 19, 2024 05:46
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@iangcarroll
iangcarroll / Security.php
Last active April 19, 2021 23:32
Expose (a PHPIDS fork) middleware for Laravel. Assumes it's already included via composer.
<?php namespace App\Http\Middleware;
use Closure;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Log;
class Security {
/**
@ssx
ssx / logstash.conf
Created October 24, 2015 15:09
Laravel Logs to Logstash
input {
lumberjack {
port => 5000
type => "logs"
ssl_certificate => "/shared/logstash-certs/logstash-forwarder.crt"
ssl_key => "/shared/logstash-certs/logstash-forwarder.key"
}
}
## Add your filters here
@rvanbruggen
rvanbruggen / 1 - neo4jknowledgegraph.adoc
Last active November 3, 2020 16:58
Neo4j Knowledge Graph

The Neo4j Knowledge Graph

Our friends of Neueda have been doing more and more work with Neo4j. One of the artefacts of that work (see their github repo for more info) has been an unbelievably wonderful page called Awesome Neo4j. This is a webpage with links and other resources that can be useful for people doing Neo4j projects - whether you are looking for tips and tricks, developer resources, language bindings, frameworks, visualization solutions, graph algorithm components, etc…​ all kinds of links are on this page…​ Truly great work of all the Contributors. And inspiring at that.

A Google Sheet as the main repository

Based on that work, I have tried to add some additional links that I use/know about on

@petericebear
petericebear / .php_cs
Last active June 26, 2023 02:32
Laravel 5.x php-cs-fixer config file
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
@QuantumGhost
QuantumGhost / example.puml
Last active March 23, 2024 22:39
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>