Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@seyDoggy
seyDoggy / .serverstatus.sh
Last active October 16, 2022 11:02
Shell script to monitor HTTP server status and email me when the server is not responding.
#!/bin/bash
NAME=Adam
TESTDATE=`date "+%B %e, %Y"`
TESTTIME=`date "+%H:%M:%S"`
auto_init() {
runTest
}
runTest() {
@seyDoggy
seyDoggy / SomeCtrl.js
Last active March 4, 2022 16:54
My version of the AngularJS ui-bootstrap alert service as derived from here: https://coderwall.com/p/r_bvhg/angular-ui-bootstrap-alert-service-for-angular-js. No $rootScopes were harmed in the making of this code.
(function () {
'use strict';
angular.module('myApp')
.controller('SomeCtrl', SomeCtrl);
SomeCtrl.$inject = ['$scope', '$http', ' alertService'];
function SomeCtrl($scope, $http, alertService) {
$http.put('http://some.url/user/44', {
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// LICENSE under MIT - https://github.com/twbs/bootstrap/blob/master/LICENSE
//
// Source: https://gist.github.com/seyDoggy/4f370a676f5db6df2d1d
// Forked: https://gist.github.com/andyl/6360906
//
// This is a hack to fill the gap between 480 and 760 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
@seyDoggy
seyDoggy / zip all files.sh
Created October 31, 2012 13:37
Shell script to zip all files in a folder.
FILES=./*; for f in $FILES; do ditto -ck "$f" "$f.zip"; done
@seyDoggy
seyDoggy / let g:ctrlp_custom_ignore
Created December 3, 2014 14:02
Getting around spf13-vim's ctrlp_user_command in order to set ctrlp_custom_ignore
" The custom ignore feature in ctrlp.vim is a useful feature
" when you want to ignore files and folder in your directory
" structure. However if yo set g:ctrlp_user_command then
" g:ctrlp_custom_ignore had no effect. This is all well and
" and good unless you use a vim distribution like spf13-vim
" that just so happens to set g:ctrlp_user_command. So here
" is how you get around that issue in your own .vimrc.local:
"
" unlet the original spf13-vim settings
unlet g:ctrlp_custom_ignore
@seyDoggy
seyDoggy / responsive-sticky-footer.css
Last active November 30, 2017 03:04
Responsive sticky footer for bootstrap
@seyDoggy
seyDoggy / UsersData.java
Created April 7, 2017 13:28
Cloud Foundry: Consuming arrays with cloud config
@ConfigurationProperties(prefix = "users.service")
@Configuration
@Component
public class UsersData {
private String[] benefitType;
private String[] status;
// setters/getters…
@seyDoggy
seyDoggy / jetbrains-studio.desktop
Created February 24, 2017 13:08
Contents of Android Studio .desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Icon=/usr/local/share/android-studio/bin/studio.png
Exec="/usr/local/share/android-studio/bin/studio.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-studio
@seyDoggy
seyDoggy / restful.module.js
Last active September 4, 2016 05:29
An AngularJS RESTful Constructor
/**
* @ngdoc module
* @name Restful
* @description
*
* Restful is a base class from which to extend and create more CRUD services
* without the need to repeat the same CRUD operations and implementation
* with each additional service.
*
* The Restful factory takes one argument, a configuration object.
@seyDoggy
seyDoggy / .profile
Last active August 31, 2016 12:03
to change shell on LDAP system
export SHELL=`which zsh`
# Works on Ubuntu
#[ -z "$ZSH_VERSION" ] && exec "$SHELL" -l
# Works on Fedora
#/usr/bin/szh