Skip to content

Instantly share code, notes, and snippets.

View mfd's full-sized avatar

Kami mfd

  • Checkmagush
View GitHub Profile
@alexreardon
alexreardon / Native.js
Last active August 26, 2023 18:52
Some vanilla JS methods and patterns
// Native selectors.
(function(window, document) {
'use strict';
var noop = function() {
};
// DOCUMENT LOAD EVENTS
// not needed at the bottom of the page
document.addEventListener('DOMContentLoaded', noop);
@dalekunce
dalekunce / mapillary_setup.md
Last active May 13, 2017 09:57
Mapillary Setup and Tools

#merge gpx files

gpsbabel -i gpx -f file1.gpx -f file2.gpx -o gpx -F merged.gpx

#attach GPX to photo get needed libs first

pip install gpxpy
brew install pyexiv2 exiftool
git clone https://github.com/mapillary/mapillary_tools.git
python geotag_from_gpx.py path/to/photos gpx_track.gpx timeoffset
@jerry4
jerry4 / simpleCookies.js
Created December 12, 2014 21:31
Vanilla js to get cookies
// from stackoverflow: http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript
(function(){
var cookies;
function readCookie(name,c,C,i){
if(cookies){ return cookies[name]; }
c = document.cookie.split('; ');
cookies = {};
@dsadhanala
dsadhanala / Jade: Table iteration
Last active August 9, 2016 19:20
Jade Snippet: Table iterator
//- compile and see the output online at below URL
http://jade-lang.com/
//- table data
- var tableData = [['R1 Col1', 'R1 Col2', 'R1 Col3'], ['R2 Col1', 'R2 Col2', 'R2 Col3'], ['R3 Col1', 'R3 Col2', 'R3 Col3'], ['R4 Col1', 'R4 Col2', 'R4 Col3'], ['R5 Col1', 'R5 Col2', 'R5 Col3']]
//- table markup
table.table
//- table head
tr.t-head
@magicznyleszek
magicznyleszek / multiply-blending-mode-to-png.md
Created August 20, 2014 11:27
Multiply blending mode to PNG in Photoshop
  1. copy your image (Ctrl+A and Ctrl+C)
  2. make a new document-sized pure-black layer behind it
  3. group the black layer and yor image together
  4. add mask to the group
  5. enter mask edit mode (alt+click on the mask icon/thumbnail)
  6. paste your image in the mask (b/w) and then invert it.
  7. save it as a 24-bit transparent PNG
@orlovmax
orlovmax / Less BEM-styled selectors
Last active November 21, 2016 12:48
Less/Scss trick to generate BEM-styled selectors
Less css trick to generate BEM-styled selectors, by Max Shirsin, http://noteskeeper.ru/1139 + Scss version
@block: ~".dm-import-feed";
@{block} {
&_step_2 {
@{block}__page_step_2 {
display: block;
}
}
@cheets
cheets / pom.xml
Created June 12, 2014 10:38
Using rubygems to compile compass/sass with maven
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.arcusys</groupId>
<artifactId>theme</artifactId>
<packaging>war</packaging>
<name>theme Theme</name>
<version>1.0-SNAPSHOT</version>
@phillipalexander
phillipalexander / SourceCodeSearchEngines.md
Last active March 17, 2024 12:22
Source Code Search Engines You Can Use For Programming Projects

Source Code Search Engines

NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.

Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.

@shaneriley
shaneriley / mixins.jade
Created February 10, 2014 20:10
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@joyrexus
joyrexus / README.md
Last active February 19, 2024 17:15 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})