Skip to content

Instantly share code, notes, and snippets.

View unicolet's full-sized avatar

Umberto Nicoletti unicolet

View GitHub Profile
@unicolet
unicolet / gist:6843034
Created October 5, 2013 16:32
pulse and bounce animation
.animated{-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;}.animated.hinge{-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);}
40% {-webkit-transform: translateY(-30px);}
60% {-webkit-transform: translateY(-15px);}
}
@-moz-keyframes bounce {
0%, 20%, 50%, 80%, 100% {-moz-transform: translateY(0);}
Master.mainPage = SC.Page.design({
// The main pane is made visible on screen as soon as your app is loaded.
// Add childViews to this pane for views to display immediately on page
// load.
mainPane: SC.MainPane.design({
childViews: ['labelView'],
labelView: SC.ButtonView.design({
count: 1,
@unicolet
unicolet / gist:6175235
Created August 7, 2013 15:40
generate a list of sproutcore tests for CI
find frameworks/ -iname "*.js" -type f | grep tests | sed "s/frameworks\//{url:'sproutcore\//" | sed "s/\.js/\.html'},/"
@unicolet
unicolet / gist:6094139
Created July 27, 2013 07:37
travis for sc
language: ruby
rvm:
- 1.9.3
gemfile: gemfiles/Gemfile.ci
before_install:
- git clone git://github.com/sproutcore/abbot.git
@unicolet
unicolet / phantom_sc.js
Last active December 20, 2015 05:39
Sample script to run SC segmentedview tests in phantomjs. Needs https://github.com/sproutcore/sproutcore/pull/1018
function waitFor(testFx, onReady, timeOutMillis) {
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 30000, //< Default Max Timout is 30s
start = new Date().getTime(),
condition = false,
interval = setInterval(function() {
if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) {
// If not time-out yet and condition not yet fulfilled
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code
} else {
if(!condition) {
@unicolet
unicolet / opennms_clean_old_windows_drive_rrds.sh
Created June 12, 2013 07:17
Script to archive all 'old format' drive information collected by opennms for Windows systems. Opennms > 1.10 will collect this data in a directory named after the drive letter (A,B,C, and so on) instead of the drive index.
/usr/bin/find /opt/opennms/share/rrd/snmp/ -wholename "*/hrStorageIndex/[12345]" -type d | /bin/tar -cf old_drive_info.tar --files-from -
/usr/bin/find /opt/opennms/share/rrd/snmp/ -wholename "*/hrStorageIndex/[12345]" -type d | /usr/bin/xargs /bin/rm -rf
@unicolet
unicolet / capsd-configuration.xml
Last active December 17, 2015 11:18
OpenNMS configuration to monitor user tablespace quota usage in an Oracle database
<protocol-plugin protocol="OracleMonitoring" class-name="org.opennms.netmgt.capsd.plugins.JDBCPlugin" scan="on">
<property key="driver" value="oracle.jdbc.driver.OracleDriver"/>
<property key="user" value="opennms"/>
<property key="password" value="opennms"/>
<property key="url" value="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OPENNMS_JDBC_HOSTNAME)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))"/>
<property key="retry" value="1"/>
</protocol-plugin>
----------
State: - pkgrepo
Name: pgdg-92-centos
Function: managed
Result: False
Comment: Failed to confirm config of repo pgdg-92-centos: coercing to Unicode: need string or buffer, NoneType found
Changes:
@unicolet
unicolet / zfs_report.sh
Last active July 26, 2018 17:08 — forked from cypres/zfs_report.sh
ZFS On Linux Version. Note that drive health is not reported since I am running ZFS on a VM
#!/bin/sh
echo "ZFS listing:"
/sbin/zfs list
echo
echo "ZFS compression ratio:"
/sbin/zfs get compressratio | /bin/grep -v @
echo
<!doctype html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="robots" content="index,follow" />
<meta name="language" content="it" />
<meta http-equiv='pragma' content='no-cache' />
<meta http-equiv='expires' content='0' />
<meta http-equiv='cache-control' content='no-cache' />
<meta http-equiv="cache-control" content="must-revalidate" />