Skip to content

Instantly share code, notes, and snippets.

View joelstein's full-sized avatar

Joel Stein joelstein

View GitHub Profile
@joelstein
joelstein / ResponsiveChecklist.md
Last active December 2, 2015 16:03
Checklist for converting existing design to responsive
@joelstein
joelstein / gist:e2528d32747c7f5b8ce5
Last active March 31, 2017 20:40
Apache and logrotate
# First do this, then choose from one of the options below.
sudo nano /etc/logrotate.d/apache2
# Apache 2.4, Ubuntu 14.04.2 LTS
/var/www/*/log/*.log {
weekly
missingok
rotate 52
@joelstein
joelstein / gist:135a5de77cb8de0626ac685dd6521d56
Last active June 15, 2016 20:19
Angular directive to blur field on enter
angular.module('enterBlur', [])
// Blurs element when enter is pressed.
.directive('enterBlur', function($timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
$timeout(function() {
Drupal.attachBehaviors(element);
});
@joelstein
joelstein / bootstrap-modal.js
Last active November 20, 2017 22:04
AngularJS Bootstrap 4 Modal Service
(function(angular) {
// Define module.
var module = angular.module('bootstrapModal', []);
// Define service.
module.service('$bootstrapModal', ['$q', '$templateRequest', '$rootScope', '$compile', '$controller', function($q, $templateRequest, $rootScope, $compile, $controller) {
var self = this, $element, opened, closed;
@joelstein
joelstein / README.md
Created July 31, 2023 17:19 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)