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 / index.js
Created November 21, 2022 14:36
JavaScript DYI map, filter, reduce
const arr = [1, 2, 3, 4, 1, 2, 3];
const originalMap = arr.map(i => i + 1);
const myMap = (arr, cb) => {
let temp = [];
for(let i = 0; i < arr.length; i++) {
temp.push(cb(arr[i]));
}
@ummahusla
ummahusla / index.html
Last active July 27, 2018 12:29
Currencies
<select className="form-control ignore" id="currency" name="currency">
<option value="36">AED - United Arab Emirates Dirham</option>
<option value="175">AFN - Afghan Afghani</option>
<option value="38">ALL - Albanian Lek</option>
<option value="39">AMD - Armenian Dram</option>
<option value="176">ANG - Netherlands Antillean Guilder</option>
<option value="177">AOA - Angolan Kwanza</option>
<option value="42">ARS - Argentine Peso</option>
<option value="19">AUD - Australian dollar</option>
<option value="178">AWG - Aruban Florin</option>
@ummahusla
ummahusla / index.html
Created January 26, 2018 13:06
Shipping beats perfection
<div class="container">
<div class="logo row">
<div class="twelve column">
<button id="myBtn">Open Modal test</button>
</div>
</div>
<div id="grid">
@ummahusla
ummahusla / git-overwrite-branch.sh
Last active February 25, 2024 00:06 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@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

@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 / 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 / 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 / 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 / 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