Items filtered by date: December 2015

Saturday, 28 January 2017 10:10

My Git Repository Provider Notes

This is my research on Git client software, Git server software and Git hosted services.

TL;DR = Use GitHub

Git is better than SVN for the following reasons and is why I use Git over SVN

  • Git is a distibuted repository system - What this means is you can work offline with your copy of the repository to which you can save, edit and modify etc.. and then when you go online you sync your repository rather that having to sync individual changes as soon as you have made them. This makes for a more efficient working enviroment.
  • There are many free Hosted Git repositories and many free local Git servers.

Online Repositories

  Bitbucket GitLab GitHub Gitea
URL https://bitbucket.org/ https://about.gitlab.com/gitlab-com/ https://github.com/

https://about.gitea.com/

Technology Cloud / Local Cloud / Local Cloud Cloud / Local
Model Free / Pro Free / Pro Free / Pro Free / Pro
Pro Terms basically $1 per Month User in blocks (10/25/50/100/Unlimited) - Academics can get unlimited account for free $39 per year per user Costing is done per number of users  
Notes Get unlimited private and public repositories with Bitbucket. Bitbucket Cloud is free for small teams of 5, integration with JIRA and Mercurial, issue tracking via JIRA, wiki -- 2gb repositry size https://confluence.atlassian.com/bitbucket/what-kind-of-limits-do-you-have-on-repository-file-upload-size-273877699.html, https://blog.bitbucket.org/2014/05/30/repository-size-limits/ Free unlimited public & private repositories and unlimited collaborators. 10GB Disk Space - Want to start using GitLab? You can easily import your repositories from Bitbucket, GitHub, Gitorious or anywhere else, all in batch!, this is the closet to GitHub, it supports the import of git and the issues, wikis, milestones and labels, it alos looks the closets inbuilt wiki and issue tracking  

Local Repositories

  Bitbucket Server GitLab CE Git SCM git for windows GitStack Bonobo Git Server Gogs - Go Git Service
URL https://bitbucket.org/product/server https://about.gitlab.com/downloads/ https://git-scm.com/ https://git-for-windows.github.io/ http://gitstack.com/ https://bonobogitserver.com/ https://gogs.io/
Technology Windows x64, Linux x64, Mac OS X Rasberry Pi 2 and other linux distros Windows, Mac OS X, Linux, Solaris Windows Windows Windows (via IIS)  
Model Paid Free (Single Tenant?) Free Free Free (for small teams)    
Pro Terms $10 1-Time payment for upto 10 Users further tiers available unlimited users          
Notes No Issue tracking a single-tenant solution which means your IP does not share the underlying infrastructure with other customers, opensource, basically linux only and would require VM for windows I think this is the creators of Git, possible command line only        

Notes

  • What is Mercurial repository hosting - it is another type of repository
  • Git was invented by linus torvell (the linux creator)
  • Git does not inherently come with a bugtracker, that is specific to the supplier
  • issue tracking is non standard so consider redmine
  • JIRA on local PC $10 1-Time payement for up to 10 users - is this a bug tracker
  • GitHub for all open source
  • you can move git repositories from one proveder to another
  • issue tracking is sseperate to Git and I don’t believe can be moved from 1 repo to another
  • bitbucket, gitlab and github have importers
  • what is jira
  • gitlab seems a lot slicker
  • if my projects get to big I can always do a virtual machine or use a rspeberry pi
  • bitnami has a gitlab virtual machine
  • bitbucket has a native windows executable
  • gitlab and github are both based on ruby on rails
  • need to researh JIRA
  • gitlab has this thing called Continuous Integration  (CI) which allows live testing of code
  • gitlab does not allow githooks in community edition - http://docs.gitlab.com/ee/customization/issue_closing.html
  • gitlab you can add files, bitbucket you cannot
  • gitlab has CI integration
  • gitlab sends you a quickstart email

My Thoughts?

  • bitbuckets is great for small companies with many projects who want all features of git, bit bucket has JIRA integration and the lcoal server version with JIRA is availabe for upt to 10 people for $20 1-Time payment which is great if you want a lcoal copy. The paid versions scale up quite nicly.
  • "gitlab is great for a single deloper whoes projects are not large in size, and needs many people to work on it. Gitlab communtiy edition is crippled and nto all git fuctions are vailable for the expert user, the local server is avaiable as a virtual mnachine for Pc, rasberyy pir 2 (but a bit slow) and othe flavours of linx --
  • To replace GitLab, you'd need a combination of Bitbucket server, JIRA, Confluence, and Bamboo. --"
  • Gitlab is the better choice for me because it has more fetures and I am never going to go over the 10gb limit and it can allow as many users as I want, If I do need more than 10gb I can setup a private server although I am not sure how to migrte to it just yet from the cloud version. the extra CI features are nice and migth come in handy later
  • for all my opensourec projects, suich as myitcrm I will use Github as this is the market leader and there are no limits to the account except it cannot be a private reposotry.
  • I went with the cloud version of GitLab because I don’t want the hassle of runnigna server and I can share worldwide. I also do not have to setup a serve local and maintain it. I would like to know how to backup my repositoires to my local machine once in a while.
  • no free SVN repositories out there but market leading free Git reposotries hence why I have picked Git and everytone seems to be moving to it. You can migrate the whole repositorie from one palce to another in tack by a simple command

Git Clients

Published in Programming
Friday, 27 January 2017 14:07

PHP comment characters

We should all know these but I didnt so I have just made a note of the PHP comment characters you can use.

#

//

/*
 *
 */ 

and in a HTML code block, within a PHP page, you should still use the code below as normal.

 <!-- -->
Published in PHP
Friday, 27 January 2017 14:05

What is PHP

This really is a place holder fopr me to explain PHP in simple terms.

PHP is a combination of

  • classes
  • functions
  • magic functions
  • maths
  • variables and constants

which is oriented around creating HTML and responding to POST and GET requests.


PHP also utilises numbers and text

 

Published in PHP
Friday, 27 January 2017 13:09

Grid columns in Footer

This allows me to use joomlashine <div class="grid-layout"></div> in the footer. This code was used in the JSN Dona template would I am sure is the same for all of the other templates. It is great for adding in modules or mutliple menus.

/*-- Grid columns in Footer --*/

/* grid columns get squashed in footer */
div#jsn-pos-footer {
    width: 100% !important;
}

/* set min width for grid layout */
/* #jsn-footer div.grid-layout4 div.grid-col, - for reference only */
#jsn-footer div[class*="grid-layout"] div.grid-col {
	min-width: 200px;
}

/* note this is the total width of the columns -1px */
@media only screen and (max-width: 799px), (max-device-width: 799px) {
    #jsn-footer div[class*="grid-layout"] div.grid-col {
        width: 100%;
        
    }
    /* centers all items */
    #jsn-footer div[class*="grid-layout"] div.grid-col_inner {   
        text-align: center;
    }
    /* centers social icons - i also could add text-align: justify; to the custom html code */
    #jsn-footer #jsn-social-icons ul li a {	
        text-align: center;
    }
}

/* fix for column min height  custom.css 2378 */
@media only screen and (max-width: 768px), (max-device-width: 768px) {
    div.grid-layout4 div.grid-col {
        min-height: 1px;
    }
}

 

Published in Joomlashine
Friday, 27 January 2017 12:14

Logo

I cant remember where I have used this.

/** logo fix / header **/

/* remove large gap above and below - when you have seperated menu and logo */
#jsn-logo a {
	margin-top: 10px;
    margin-bottom: 0;
}

/* make the header sections responsive so they look nice */
@media screen and (max-width: 640px) {
    
    #lancastrian-header-left{
        float: none !important;
        text-align: center;
    }
    
    #lancastrian-header-right{
        float: none !important;
        text-align: center;
    }    
    
}

 

 

Published in Joomlashine
Friday, 27 January 2017 10:18

3 Horizontal Modules via HTML

Use this when the module position your want to use does not support horizontal seperation. It requires the code below and the use of the import modules code.

<div style="display: inline-block; width: 30%; min-width: 180px;">{module Footer Menu}</div>
<div style="display: inline-block; width: 30%; min-width: 180px;">{module Payments Accepted}</div>
<div style="display: inline-block; width: 30%; min-width: 180px;">{module Footer Address}</div>

 

Published in JSN Modules
Friday, 27 January 2017 10:10

Centered Horizontal Logos

This is a simple bit of code to add logos in a horizontal line that collapses to a centered column

QuantumWarp QuantumWarp QuantumWarp

HTML

<p style="text-align: center;">
    <img src="/images/kb/2017/874/quantumwarp-logo.png" alt="QuantumWarp" style="display: inline-block;" />
    <img src="/images/kb/2017/874/quantumwarp-logo.png" alt="QuantumWarp" style="display: inline-block;" />
    <img src="/images/kb/2017/874/quantumwarp-logo.png" alt="QuantumWarp" style="display: inline-block;" />
</p>

 

Published in Packages
Friday, 27 January 2017 09:24

cPanel SSL SNI research

In a world where IPv4 addresses have run out SNI came along to allow multiple SSL certficates to be installed on 1 IP address. The protocol allowing this is SNI. cPanel is quite far behind the rest of the world and browsers in supporting this, however a basic implementation of this is now active in their stable releases. Below I will outline some of the issues I found.

What names should I have in my certificate

Beacause of the way cPanel handles subdomains and parked domains, a type of virtual host, you can only add a single SSL certificate per cPanel account and this only really supports www and non-www names. I have only verified the following occurs with subdomains but there is a high chance it is the same for parked domains.

When you make any HTTPS request to you website/account then the primary domain, with no subdomain, will be served irrespective of the domain name. This mean that only the content from the primary domain name i.e. https://quantumwarp.com/  will be served and by an accident https://www.quatumwarp.com/ would show the same content which is great for most peopel so they can choose between www and no-www version of their site without have ing to worry. https://search.quantumwarp.com/ would also show the content from https://quantumwarp.com/. Another note about this is that if you goto to https://search.quantumwarp.com/ to stop SSL errors, your SSL certificate need search.quantumwarp.com in its alternate names.

cPanel has support for SNI on mail services which is great but after research it onnly uses the primary domain name i.e. https://quantumwarp.com/.cPanel is going to add support for https://mail.quantumwarp.com/ in future versions.

StartSSL recommends that you set the non-www as the common name of your certificate and add the www version next.

What would I do

create a SSL certificate with the following names. This allows for all HTTPS features to work in cPanel.

quantumwarp.com = Common Name
www.quantumwarp.com

Other names

These are just some of my domain name ideas for the day cPanel properly supports SNI for multiple domains on one account.

  • quantumwarp.com
  • www.quantumwarp.com
  • cpanel.quantumwarp.com
  • whm.quantumwarp.com
  • mail.quantumwarp.com
  • webmail.quantumwarp.com
  • search.quantumwarp.com
  • demo.quantumwarp.com

Notes

  • Authentication is required for IMAP, POP3, and SMTP.
  • mail.quantumwarp is not allowed. You can use quantumwarp.com.
  • You cannot use www.quantumwarp.com for SNI (it is a subdomain)
  • you cannot use your own certificate for protected subdomains.
  • You can only use your primary domain name for SNI
  • sni support www and non-www domains for https
  • There are a lot of updates in cpanel 60 ( i think they are adding mail.domain.com support)
  • I dont know if SNI uses the common name or the non-www version. Good change it is the common name
  • Always use root domain as common name.
  • currently there is no support in cpanel for SNI sub domains
  • "issue free DV certificates from Comodo" this is getting added in 58/60
  • if you use a subdomain with a matching entry in the SSL certificate then when you access in on a https you r main site will display.
  • if i just use quantumwarp.com as the common name then there will be no issue with using the subdomain for SNI
  • the www domain is an alias of the main site but with the ability to use a vaild https entry much like any other subdomain. https subdomians will never show their own content the main site is always shown.
  • only question is, is it the common anme that is used or specifically the non-www entry in which case the common name does not matter. a small issue. ( i could use lambretta innovation to test this at some point as their common name is www version)
    You can use SMTP 465 and SSL || SMTP 587, 25, 26 TLS  (remember this is starttls)
Published in cPanel
Friday, 27 January 2017 09:16

Horizontal Line

This element can be styled like all others and has preset styles by the browser.

/* hr styling */
hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #fff;
}

 

 

Published in Styled Elements
Thursday, 26 January 2017 19:55

Horizontal Type Line Behind Text

This is a cool little effect where you can put a line behine a title but the text remains unaltered.

EVENTS 2016

CSS

/**
 * Horizontal Type Line Behind Text
 * https://codepen.io/ericrasch/pen/Irlpm
 * Inspired by this discussion @ CSS-Tricks: http://css-tricks.com/forums/topic/css-trick-for-a-horizontal-type-line-behind-text/#post-151970
 * Available on jsFiddle: http://jsfiddle.net/ericrasch/jAXXA/
 * Available on Dabblet: http://dabblet.com/gist/2045198
 * Available on GitHub Gist: https://gist.github.com/2045198
 */

h1.background,
h2.background,
h3.background  {
  position: relative;
  z-index: 1;
}
h1.background:before,
h2.background:before,
h3.background:before {
  border-top: 2px solid #00AFB2;
  content: "";
  margin: 0 auto;
  /* this centers the line to the full width specified */
  position: absolute;
  /* positioning must be absolute here, and relative positioning must be applied to the parent */
  top: 50%;
  left: 0;
  right: 0;
  bottom: 0;
  width: 95%;
  z-index: -1;
}
h1.background span,
h2.background span,
h3.background span {
  /* to hide the lines from behind the text, you have to set the background color the same as the container */
  background: #fff;
  padding: 0 15px;
}

/* homepage CTA - how can we help */
.jsn-homepage h3.background:before {
  border-top: 2px solid #fff;
}
.jsn-homepage h3.background span {
  background: #00AFB2;
}

/* About page - Main content */
.jsn-itemid-344 h2.background.benefits span {
  background: #EFE9DE;
}

/* I dont think i need this */

h1.double:before,
h2.double:before {
  /* this is just to undo the :before styling from above */
  border-top: none;
}
h1.double:after,
h2.double:after {
  border-bottom: 1px solid blue;
  -webkit-box-shadow: 0 1px 0 0 red;
  -moz-box-shadow: 0 1px 0 0 red;
  box-shadow: 0 1px 0 0 red;
  content: "";
  margin: 0 auto;
  /* this centers the line to the full width specified */
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  width: 95%;
  z-index: -1;
}
h1.no-background,
h2.no-background {
  position: relative;
  overflow: hidden;
}
h1.no-background span,
h2.no-background span {
  display: inline-block;
  vertical-align: baseline;
  zoom: 1;
  *display: inline;
  *vertical-align: auto;
  position: relative;
  padding: 0 20px;
}

h1.no-background span:before,
h1.no-background span:after,
h2.no-background span:before,
h2.no-background span:after {
  content: '';
  display: block;
  width: 1000px;
  position: absolute;
  top: 0.73em;
  border-top: 1px solid red;
}
h1.no-background span:before,
h2.no-background span:before {
  right: 100%;
}
h1.no-background span:after,
h2.no-background span:after {
  left: 100%;
}
h1.no-span,
h2.no-span {
  display: table;
  white-space: nowrap;
}
h1.no-span:before,
h1.no-span:after,
h2.no-span:before,
h2.no-span:after {
  border-top: 1px solid green;
  content: '';
  display: table-cell;
  position: relative;
  top: 0.5em;
  width: 45%;
}
h1.no-span:before,
h2.no-span:before {
  right: 1.5%;
}
h1.no-span:after, 
h2.no-span:after {
  left: 1.5%;
}

HTML

<h1 class="background" style="text-align: center;"><span>EVENTS 2016</span></h1>

 

 

Published in Styled Elements
Page 18 of 96