Friday, January 15, 2016

Toastee : jQuery Toat Style Messages

Toastee is a light (4kb unminified) jQuery plugin for showing toast style messages. No CSS required.

The post Toastee : jQuery Toat Style Messages appeared first on jQuery Rain.


by Admin via jQuery Rain

Change the Words with jQuery

Change the words is a jquery plugin to animate the text words in different animations.

The post Change the Words with jQuery appeared first on jQuery Rain.


by Admin via jQuery Rain

Your Guide to the Hashtag Holidays of 2016 - #infographic

Social Media Content Calendar 2016 - #infographic

With 365 days on the calendar, there are only so many holidays you can fit into a year—but on social media, you can always find a reason to celebrate. Over the last few years, we’ve seen a surge in the number of quirky and sincere holidays both big and small, quirky and sincere. In January alone, we counted eight of these so-called Hashtag Holidays. There’s a day for everyone, whether you’re a community manager, a science fiction fanatic or just another cheese lover.

Brands can leverage the conversations around the holidays most relevant to them to supplement their social media strategy and join in on the fun. For example, celebrating Random Acts of Kindness Day might make sense for a nonprofit, or for a company that wants to recognize its social followers with a giveaway. Yo-Yo Day, however, might be a better fit for a toy store. With the wide range of holidays to choose from, marketers can integrate the most relevant holidays into their calendars early so they don’t miss an opportunity to hop on a trending hashtag.

To help you navigate this year’s social media-wide celebrations, Sprout Social has created a 2016 calendar listing some of our favorite holidays. We hope it will be a valuable resource as you populate your content calendars throughout the year.

by Guest Author via Digital Information World

Zebra_Datepicker – Lightweight and Configurable jQuery Date Picker

Zebra_Datepicker is a lightweight, highly configurable, cross-browser jQuery date picker plugin.

This plugin will automatically add a calendar icon to the indicated input fields which, when clicked, will open the attached datepicker


by via jQuery-Plugins.net RSS Feed

React for Angular Developers

This article was peer reviewed by Craig Bilner. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be! This article is for developers who are familiar with Angular 1.x and would like to learn more about React. We’ll look at the different approaches they take to building rich web […]

Continue reading %React for Angular Developers%


by Mark Brown via SitePoint

Deploying from GitHub to a Server

Chinchilla and Octocat

GitHub, and the Git version control system it’s based on, are fantastic tools for managing and collaborating on projects – code-based or otherwise.

In this article, we’ll look at options for making Git and GitHub projects fit better into developer workflows, allowing for a smooth and hands-off deployment process.

I’ll break these options into the different types of toolsets available – which allow for options from automatically running tests and code checks to deploying your code to a server.

Why Do This?

With these automated processes up and running, you and your team can focus purely on coding, approving and merging code, rather than spending hours on deployments and repetitive tasks every time a new build or change is ready.

Disadvantages of Automation

The main problem with automatically deploying changes is that changes are automatically deployed. You have to trust your team and the code they write. This is why automatic deployment is typically paired with automated testing, and the tools presented below reflect this.

Of course, it also means that any small issues are equally as quick to fix. Automation should be paired with communication. If pushing to a repository’s master branch can trigger live builds, it needs to be clear when this happens and who can make it happen.

The initial setup of an automation process can take some time to get right. It’s important to weigh up whether or not your team or workflow really needs it. Add up the amount of time you spend on testing and deploying new builds – and if it’s more than a few minutes each time, then it’s worth it.

Git Hooks

Git has a suite of in-built hooks that can be used for automation, and these are often our first port of call for processing tasks after particular Git actions. These are divided into server- and client-side hooks.

Server-side hooks are for events such as listening to network operations – for example, when a repository receives a push. Client-side hooks are triggered on actions that occur on a developer’s machine, such as commits and merges.

There’s a full list of hooks in Git’s documentation. I’ll look at a couple here to get you started. Hopefully you’ll start to see how they may be useful in your own projects and current (manual) workflows. The hooks are files that can contain commands in any language the host system can run, allowing for a lot of power and flexibility.

pre-commit

This client-side hook runs before any other hook, and before any changes are committed. It’s a perfect place to run tests or other checks on your code.

Let’s add some basic JavaScript to our small project (and yes, there is an intentional mistake here):

document.onload = function() {
    alert("Hello World")
};

We’ll use JSHint to check the JavaScript for errors. (You can find installation instructions here.)

Rename hooks/pre-commit.sample to hooks/pre-commit, and change the contents of the file to this:

#!/bin/sh
jshint index.js

Try to commit the changes:

git commit -m "adding Javascript file"

You’ll see the following error message:

index.js: line 5, col 25, Missing semicolon.

1 error

Add the missing semicolon and try again. The commit will now progress without any problems.

post-receive

This server-side hook triggers when a push to a remote Git repository completes. In this example, we checkout the latest version of a simple website into our webserver directory, effectively a (basic) deployment.

I have an existing website that consists of an index.html page – along with some other pages that we’ll use in later examples. You can create your own or use the repository set up here.

Clone the repository, specifying the --bare flag to create a repository that only consists of version control information and not our code base:

git clone --bare http://ift.tt/1SSeKwM GitHub-Auto-Deploy.git

Now we’ll create our hook:

cd http://ift.tt/1OvxVaH
vi post-receive

Add these lines to the file:

#!/bin/sh
git --work-tree=/var/www/html --git-dir=/var/repo/GitHub-Auto-Deploy.git checkout -f

Note: these locations are relevant to an Ubuntu installation, so remember to change paths to suit your setup.

This command will checkout the current repository into the defined working directory, but without any version control data.

We need to make the hook executable:

chmod +x post-receive

On your local machine, clone the repository as normal, using your tool of choice, and add a new remote for the live server (remember to change the server details to your webserver and user details):

git remote add prod ssh://user@domain.com/var/repo/GitHub-Auto-Deploy.git

To deploy to our production server instead of the repository, enter:

git push prod master

If you look inside the var/www/html folder, you’ll find the index.html file automatically copied into your web folder.

If you’re using your own Git repository, you can have it located on the same server as your application, and deployments are now automated. If you’re using GitHub or another external Git service, then this hook has not completely automated your workflow, but rather has reduced it to one step. This can then be simplified further.

One option is using rsync or scp commands in the post-receive hook on GitHub. Another option – especially if your application needs a build process before going live (GitHub limits possible commands) – is to use the post-receive hook to trigger scripts on your application server that checks-out your code base from GitHub (with the -f option) and runs any other necessary commands. This is starting to get complicated, which leads nicely to our next set of tools.

Continue reading %Deploying from GitHub to a Server%


by Chris Ward via SitePoint

How to Create a To-Do List App With Polymer and Cordova