Skip to content

Instantly share code, notes, and snippets.

View drewbrokke's full-sized avatar
🦆
work work work

Drew Brokke drewbrokke

🦆
work work work
View GitHub Profile
.fm-item {
min-height: $list-item-height;
@include opacity(0);
@include transition(opacity $transition-time);
&:nth-child(2) { @include transition-delay(35ms); }
&:nth-child(3) { @include transition-delay(70ms); }
<snippet>
<content><![CDATA[
console.log('$1: ', $1);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@drewbrokke
drewbrokke / .bash_profile
Last active August 29, 2015 14:06
Installs the latest version of nodejs on Ubuntu Linux
function getnode () {
local VERSION=v0.11.13
local NODE_DIRECTORY=node-$VERSION-linux-x86
local NODE_PACKAGE=$NODE_DIRECTORY.tar.gz
local NODE_URL=http://nodejs.org/dist/$VERSION/$NODE_PACKAGE
local DESTINATION=/usr/lib
function makelink () {
if [[ -h $1 ]]; then
Using CATALINA_BASE: /home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42
Using CATALINA_HOME: /home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42
Using CATALINA_TMPDIR: /home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42/temp
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64
Using CLASSPATH: /home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42/bin/bootstrap.jar:/home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42/bin/tomcat-juli.jar
Sep 16, 2014 10:53:14 PM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /home/drewbrokke/Desktop/Liferay/repos/Portal/CE/tomcat-7.0.42/temp
Sep 16, 2014 10:53:14 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-
Buildfile: /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BrickyardCrystralTriggersDetails-portlet/build.xml
BUILD FAILED
/home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BrickyardCrystralTriggersDetails-portlet/build.xml:5: Cannot find /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BrickyardCrystralTriggersDetails-portlet/C:/Data/SVNPROD/WFIG/Liferay/liferay-plugins-sdk-6.2.0/portlets/build-common-portlet.xml imported from /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BrickyardCrystralTriggersDetails-portlet/build.xml
Total time: 0 seconds
Buildfile: /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BusinessViewOwner-portlet/build.xml
/home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BusinessViewOwner-portlet/build.xml:5: Cannot find /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BusinessViewOwner-portlet/C:/Data/SVNPROD/WFIG/Liferay/liferay-plugins-sdk-6.2.0/portlets/build-common-portlet.xml imported from /home/drewbrokke/Desktop/Patched Portal/liferay-plugins-sdk-6.2-ee-sp6/portlets/BusinessViewOwner-portlet/build.xml
datePicker.inputField = A.one('#<%= randomNamespace %>displayDate');
datePicker.inputField.on('keydown', function(event) {
if (event.keyCode === 13) {
datePicker.fire('enterKey');
}
});
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
@drewbrokke
drewbrokke / prefixSuffixCheck.java
Created November 24, 2014 21:08
Prefix/Suffix Check
String prefix = ParamUtil.getString(actionRequest, "title");
String suffix = ParamUtil.getString(actionRequest, "suffix");
List<ListType> prefixModels = ListTypeServiceUtil.getListTypes(ListTypeConstants.CONTACT_PREFIX);
List<ListType> suffixModels = ListTypeServiceUtil.getListTypes(ListTypeConstants.CONTACT_SUFFIX);
List<String> prefixes = new ArrayList<String>();
List<String> suffixes = new ArrayList<String>();
for (ListType prefixModel: prefixModels) {
var enterKeydownCount = 0,
triggers = [
'#inputTriggerA',
'#inputTriggerB',
'#inputTriggerC',
'#inputTriggerB',
'#inputTriggerA',
];