Skip to content

Instantly share code, notes, and snippets.

View ubani's full-sized avatar
🏗️

Marcus ubani

🏗️
View GitHub Profile
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
@ubani
ubani / db-setup.sql
Created April 17, 2018 08:16 — forked from gka/db-setup.sql
load geoip database into mysql
DROP TABLE IF EXISTS location;
CREATE TABLE IF NOT EXISTS `location` (
`locId` int(11) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(2) DEFAULT NULL,
`region` varchar(2) DEFAULT NULL,
`city` varchar(1000) DEFAULT NULL,
`postalCode` varchar(10) DEFAULT NULL,
`latitude` float DEFAULT NULL,
`longitude` float DEFAULT NULL,
@ubani
ubani / meta-tags.md
Created March 14, 2018 00:06 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@ubani
ubani / GIF-Screencast-OSX.md
Created July 20, 2017 12:29 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ubani
ubani / Default.sublime-theme
Created June 10, 2016 08:26 — forked from MrDrews/Default.sublime-theme
Solarized (light) -- Complement the stock Solarized (light) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base02: #073642
"layer0.tint": [7,54,66],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@ubani
ubani / sessions_and_conversations.markdown
Last active May 23, 2016 15:31 — forked from jcasimir/sessions_and_conversations.markdown
Sessions and Conversations in Rails 3

Sessions and Conversations

HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.

Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.

That doesn't mean we can't use sessions, but we should only use them where necessary.

Adding, Accessing, and Removing Data