Skip to content

Instantly share code, notes, and snippets.

View cossssmin's full-sized avatar
💭

Cosmin Popovici cossssmin

💭
View GitHub Profile
@cossssmin
cossssmin / laravel4-on-shared-hosting
Last active August 23, 2016 18:34 — forked from williwambu/laravel4-on-shared-hosting
Guide to configuring laravel on shared hosting
Laravel can can hosted in shared hosting environments. One can upload all files into puplic_html(www) folder.This comes with some problems:
- Exposes your code to the public
- To view the site you have to use http://your_domain/public or use url rewriting
To avoid this you have to separate the public folder from the other laravel files.
This is how i do it:
1. Create a folder above public_html or www in some environments. Call it laravel
2. Upload all the files in your laravel application to this folder except public folder
3. Upload the contents of public folder to public_html or www
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@cossssmin
cossssmin / JavaScript-Tabs.html
Last active May 17, 2018 16:24 — forked from Jiert/JavaScript-Tabs.js
Creating Tabs with Vanilla JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tabs</title>
<style>
.tabs .active a { color: red; }
.tab-pane:not([aria-expanded="true"]) {display: none;}
</style>
</head>
@cossssmin
cossssmin / text-snippet-byte-size.js
Last active March 9, 2017 14:24
Calculate the file size of a text with JavaScript http://codepen.io/cosmin-popovici/pen/yMgwVa
/**
* Calculate byte size of a text snippet
* @author Lea Verou
* MIT License
*/
(function(){
var crlf = /(\r?\n|\r)/g,
whitespace = /(\r?\n|\r|\s+)/g;
@cossssmin
cossssmin / pine-boilerplate.html
Last active November 13, 2017 21:09
Pine Boilerplate
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head></head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="x-apple-disable-message-reformatting" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Pine Email Framework</title>
<!--[if mso]>
@cossssmin
cossssmin / pine-doctype.html
Last active November 13, 2017 21:11
Pine DOCTYPE
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
...
</html>
@cossssmin
cossssmin / pine-meta-tags.html
Created November 13, 2017 21:12
Pine Meta Tags
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head></head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="x-apple-disable-message-reformatting" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!--[if mso]>
<xml>
@cossssmin
cossssmin / pine-email-body.html
Created November 13, 2017 21:14
Pine Email Body
<body style="box-sizing:border-box;margin:0;padding:0;width:100%;-webkit-font-smoothing:antialiased;word-break:break-word;">
<table class="wrapper" bgcolor="#EEEEEE" cellpadding="15" cellspacing="0" role="presentation" width="100%">
<tr>
<td>
<table class="container" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" role="presentation" width="700">
<tr>
<td>
<!-- ADD ROWS HERE -->
@cossssmin
cossssmin / pine-wrapper.html
Created November 13, 2017 21:21
Pine Wrapper
<table class="wrapper" bgcolor="#EEEEEE" cellpadding="15" cellspacing="0" role="presentation" width="100%">
<tr>
<td>
...
</td>
</tr>
</table>
@cossssmin
cossssmin / pine-container.html
Last active November 14, 2017 08:54
Pine Container
<table class="container" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" role="presentation" width="700">
<tr>
<td>
<!-- ADD ROW TABLES HERE -->
</td>
</tr>
</table>