Skip to content

Instantly share code, notes, and snippets.

View ummahusla's full-sized avatar
✌️
Check my digital garden (edvins.io)

Edvins Antonovs ummahusla

✌️
Check my digital garden (edvins.io)
View GitHub Profile
@ummahusla
ummahusla / gist:bc160235dca2e3f67537
Created December 17, 2014 15:26
HTML5 Canvas with tabs
<canvas id="canvas" width=900 height=700></canvas>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext('2d')
var Tab = function(id, x, y, width, height, text, color) {
this.id = id;
// defaults can be changed after object creation
@ummahusla
ummahusla / .gitignore
Created February 13, 2015 11:52
WordPress .GITIGNORE
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*
!wp-content/plugins/
!wp-content/themes/
@ummahusla
ummahusla / .htaccess
Last active January 22, 2016 21:29
WordPress Leverage browser caching .htaccess
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
@ummahusla
ummahusla / _mixins.scss
Created February 23, 2015 10:10
Foundation SASS Mixins
//
// Grid Columns
//
// A mixin to help make Foundation's grid-column mixin easier
// to use when specifying multiple media quries/screen sizes
@mixin grid-columns(
// Mobile First Media Queries
$small-up-screens: 12,
//changed default to 12, makes sense - IE
@ummahusla
ummahusla / ga-custom-events.js
Created February 23, 2015 11:17
Create Google Analytics Custom Events
// Using jQuery
$('#button-id').on('click', function() {
ga('send', 'event', 'button', 'click', 'donate-button');
});
// Where:
// button is the event category
// click is the action
// donate-button is the label
@ummahusla
ummahusla / Site.php
Created April 1, 2015 10:33
CodeIgniter CRUD
<?php
class Site extends CI_Controller {
function index() {
$this->load->view('options_view');
}
function create() {
$data = array(
'title' => $this->input->post('title'),
@ummahusla
ummahusla / styles.css
Last active August 29, 2015 14:26
Change the input color of the text & placeholder on focus [SASS]
.css-input {
color: $white;
&:focus {
color: $black;
}
&::-webkit-input-placeholder {
color: $white;
}
@ummahusla
ummahusla / README.md
Created August 20, 2015 13:52
README.md starting template

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@ummahusla
ummahusla / user.cfg
Created November 24, 2015 22:52
Battlefield 4 user config by wannabenerd.co
WorldRender.MotionBlurEnable 0
WorldRender.MotionBlurForceOn 0
WorldRender.MotionBlurFixedShutterTime 0
WorldRender.MotionBlurMax 0
WorldRender.MotionBlurQuality 0
WorldRender.MotionBlurMaxSampleCount 0
PerfOverlay.Drawfps 1
GameTime.MaxVariableFPS 60
@ummahusla
ummahusla / vim-cheat-sheet.md
Created February 18, 2016 11:52
Vim Cheat Sheet

Modes

Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC] returns the editor to command mode (where you can quit, for example by typing :q!). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.

Quitting

  • :x Exit, saving changes
  • :q Exit as long as there have been no changes
  • ZZ Exit and save changes if any have been made
  • :q! Exit and ignore any changes

Inserting Text