Skip to content

Instantly share code, notes, and snippets.

View crisp2u's full-sized avatar

Cristian Pop crisp2u

View GitHub Profile
@crisp2u
crisp2u / rm_mysql.md
Created August 3, 2016 10:22 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

#!/bin/bash
#
# Automate mysql secure installation for debian-baed systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@crisp2u
crisp2u / tester-box
Last active December 28, 2015 14:58
Boxstarter Tester box
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Update-ExecutionPolicy Unrestricted
Install-WindowsUpdate -AcceptEula
cinst googlechrome
cinst firefox
cinst skype
cinst thunderbird
cinst 7zip.install
cinst javaruntime
@crisp2u
crisp2u / release-git-script
Last active September 29, 2015 12:56 — forked from regis-leray/release-git-script
Release script using git and maven release plugin.Based on the "successful git branch model" and https://gist.github.com/searls/1043970Its also managed the hotfix feature
#!/bin/bash
# How to perform a release with git & maven following the git flow conventions
# ----------------------------------------------------------------------------
# Finding the next version: you can see the next version by looking at the
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate,
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would
# perform the release for version "0.0.2" and increment the development version
# of each project to "0.0.3-SNAPSHOT".
#
@crisp2u
crisp2u / activeSessions.cfm
Last active August 29, 2015 14:05
List active applications and session on the CF server
<cfscript>
adminObj = createObject("component","cfide.adminapi.administrator").login("password");
serverMonitor = createObject("component","cfide.adminapi.servermonitoring");
sessions = serverMonitor.getAllActiveSessions();
ss = "";
writeOutput("Nr of active sessions: #Arraylen(sessions)# <br/>");
writeOutput("List of all active CF applications:<br/>");
for( aSession in sessions) {
if(ListFindNoCase(ss,aSession.appName) eq 0) {
ss = ListAppend(ss,aSession.appName);
logBox["categories"]["MyLogger"] = { levelMin="FATAL", levelMax="DEBUG", appenders="MyAppender"};
var myAppenderAttr = {
name="MyAppender",
class="coldbox.system.logging.appenders.FileAppender",
properties={
filePath = "log/",
fileName = "mylog"
}
};