Skip to content

Instantly share code, notes, and snippets.

import com.google.common.base.CaseFormat
import com.intellij.database.model.DasObject
import com.intellij.database.model.DasTable
import com.intellij.database.model.ObjectKind
import com.intellij.database.util.Case
import com.intellij.database.util.DasUtil
/**
* modification of origin script :
* - add comment support (if you are non native English user, it is very important)
@Saul-Mirone
Saul-Mirone / Cookie.js
Last active February 7, 2017 05:56
A Node.js cookie module, a middleware based on express or my core.js module
@gortok
gortok / pre-receive.py
Last active June 8, 2020 12:39
Python Pre Receive hook for checking commit messages
#!/bin/python
import sys
import re
import subprocess
#Format: "oldref newref branch"
line = sys.stdin.read()
(base, commit, ref) = line.strip().split()
new_branch_push = re.match(r'[^1-9]+', base)
@odytrice
odytrice / Sql Server Kill Processes.sql
Last active October 18, 2018 05:19
Troubleshooting SQL Server
# DANGER - Kills all processes for a specific database
-- DECLARE @SQL varchar(max);
-- SELECT @SQL = COALESCE(@SQL,'') + 'Kill ' + Convert(varchar, r.session_id) + ';' from sys.dm_exec_requests r left join sys.dm_os_waiting_tasks t
-- on r.session_id = t.session_id where r.session_id >= 50 and r.session_id <> @@spid
-- EXEC(@SQL)
@qsLI
qsLI / gist:1f10fa5b8b76f3b5efaf74ad3d6da413
Created September 21, 2016 04:01 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@raphw
raphw / BootstrapAgent.java
Last active March 26, 2024 06:56
An example agent that intercepts a method of the bootstrap class loader.
package net.bytebuddy;
import net.bytebuddy.agent.ByteBuddyAgent;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.dynamic.ClassFileLocator;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.dynamic.loading.ClassInjector;
import net.bytebuddy.implementation.MethodDelegation;
import net.bytebuddy.implementation.bind.annotation.SuperCall;
@bikz05
bikz05 / facedetection.ipynb
Last active June 11, 2016 09:50
Face Detection using OpenCV
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jojobyte
jojobyte / ContextCmder-Disable.reg
Last active May 13, 2024 12:38
Cmder Context (Right-Click) Menu for Windows 7, 8, 10 & 11
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing
@aras-p
aras-p / preprocessor_fun.h
Last active May 23, 2024 08:26
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,