• Starting cloudsh search project

    cloudsh

    I’m starting a new side project to learn Golang and use AWS Lambda.

    The basic idea is an API that will index a website and provide a searching interface using JavaScript.

    The target users are those creating static / generated sites. Sites where having a database setup doesn’t make sense.

    I’m gonna run the API and processing on AWS Lambda using the awesome Apex and Up projects. I really like the serverless idea and am looking forward to trying it out.

    If it sounds interesting, join the mailing list at cloudsh

  • jQuery welcome mat

    Welcome mat for getting email addresses or promoting other things to recent visitors to your site. Hides the form after the first view for 14 days.

    Needs jQuery before the following code.

    jQuery(document).ready(function($) {
      var setCookie = function(key, value, days) {
        var expires = new Date();
        expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000));
        document.cookie = key + '=' + value + ';expires=' + expires.toUTCString() +';path=/';
      }
    
      var getCookie = function(key) {
        var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
        return keyValue ? keyValue[2] : null;
      }
    
      var visitedBefore = getCookie('welcome-mat-1');
      var el = $(".welcome-mat");
      el.remove();
    
      if (visitedBefore !== '1') {
        $("body").prepend( el );
    
        $("div.welcome-mat").hide().css("height", $(window).height()).slideDown(750);
        $("div.welcome-mat-content").css("margin-top", ($(window).height() - $(".welcome-mat-content").outerHeight()) / 2);
    
        $(window).bind("resize", function() {
          $("div.welcome-mat").css("height", $(window).height());
          $("div.welcome-mat-content").css("margin-top", ($(window).height() - $(".welcome-mat-content").outerHeight()) / 2);
        });
    
        $('.close-welcome-mat').on('click', function(e){
          e.preventDefault();
          $("div.welcome-mat").slideUp(500, function() { 
            $(this).hide().remove();
            $("body").scrollTop(0);
          });
        });
    
        setCookie('welcome-mat-1', '1', 14);
      }
    });
    

    Add the following style and HTML to the page. Doesn’t matter where, but I put it near the bottom of the page. It will vertically center the welcome-mat-content.

    <style>
      .welcome-mat {
        height: 0px;
        z-index: 1100;
        display: none;
        position: relative;
        background: white;
      }
    </style>
    
    <div class="welcome-mat container">
      <div class="row welcome-mat-content">
        Whatever content you want here
      </div>
    </div>
    
  • Who's Got Your Back

    Explores the idea of creating a few deep relationships to help you get farther in your goals then you could by yourself. Basically, creating relationships where you can get and give honest feedback to overcome obstacles and roadblocks, some that you probably can’t see yourself.

    Groups

    Notes

    The 4 mind sets: Candor < Vulnerability < Accountability < Generosity

    9 steps

    1. Articulate your vision
    2. Find your lifeline relationships
    3. Practice the art of the long slow dinner
    4. Broaden your goal-setting strategy (learning and performance goals)
    5. Create your Personal Success Wheel
    6. Learn to fight
    7. Diagnose your weaknesses
    8. Commit to improvement
    9. Fake it till you make it then make it stick

    Starting point for staring your own group: How to Conduct a Meeting (Kindle Locations 3793-3794).

    Who’s Got Your Back Author: Keith Ferrazzi

  • The Undoing Project

    This was an interesting read about where some of hte current thinking about decision-making came from. It’s more a story about the two people who worked together to create the these papers, Daniel Kahneman & Amos Tversky.

    While the store was interesting, the biggest take away for me was another reminder that people do not make ration decisions. That they can be manipulated to make different choices about the same things based on how those things are presented.

    I was suprised by how much push back there ideas received, even though it’s obvious that you personally make the mistakes they are talking about.

    The Undoing Project Author: Michael Lewis

  • Steal Like an Artist

    10 Things Nobody Told You About Being Creative

    Steal Link an Artist: 10 Things Nobody Told You About Being Creative is a short quick read with lots of ideas about being creative and getting inspiration.

    Author: Austin Kleon

  • Create or Hate

    Make Things!

    Create or Hate is a quick, short read but very inspiring. Get out there and create things!

    Author: Dan Norris

    Other books

  • Rake Package to Create Zipfile

    Small Rakefile to package a WordPress plugin into a zip file that can be installed by uploading.

    The Rake::PackageTask requires FileTasks that describe how to build the files, since we don’t really need to do anything, we just need to define what the files are.

    require 'rake'
    require 'rake/packagetask'
    
    file 'README.txt'
    file 'admin/**'
    file 'includes/**'
    file 'languages/**'
    file 'public/**'
    file "index.php"
    file "LICENSE.txt"
    file "README.txt"
    file "remote-api.php"
    file "uninstall.php"
    
    Rake::PackageTask.new("remote-api", :noversion) do |p|
      p.need_zip = true
      p.package_files.include(
        "admin/**",
        "includes/**",
        "languages/**",
        "public/**",
        "index.php",
        "LICENSE.txt",
        "README.txt",
        "remote-api.php",
        "uninstall.php")
    end
    

    Then to create the zip, just run rake package. It’ll create the file in the pkg/remote-api directory, or whatever name you gave the package.