Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View matt212's full-sized avatar
🚀
Open for consultation , Freelance and excited to collaborate and contribute

matt212

🚀
Open for consultation , Freelance and excited to collaborate and contribute
View GitHub Profile
#!/bin/sh
DIR="/cygdrive/C/elasticsearch-jdbc-2.3.4.1/"
bin=${DIR}/../bin
lib=${DIR}/../lib
echo '{
"type" : "jdbc",
"jdbc" : {
@matt212
matt212 / rename primary script.sql
Last active May 22, 2017 13:17
after mysql migration to postgres restarting primary key sequences and most importantly retaining older data for referential integrity aspect !
--create new column to create sequences
alter table modnames add id serial;
---update new column serial column with existing value
UPDATE modnames m
SET id = m0.modnameid
FROM modnames m0
where m.modnameid=m0.modnameid
---now tricky part is to tell new serial to start from max(existingid) for referential integrity
--scenarios
---to figure out your serial sequence
This file has been truncated, but you can view the full file.
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.1
*/
(function( window, angular, undefined ){
"use strict";
(function(){
function isAuth(req, res, next) {
var token = req.body.token || req.param('token') || req.headers['x-access-token'];
//check whether request has token !
if (token != undefined) {
// decode token
if (token) {
// verifies secret and checks exp