Skip to content

Instantly share code, notes, and snippets.

View neko-fire's full-sized avatar
💭
Save the princess

Martin neko-fire

💭
Save the princess
  • Germany / Philippines
View GitHub Profile
@neko-fire
neko-fire / PDF2Text
Created October 18, 2013 08:24
PDF to text converter class
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@neko-fire
neko-fire / gist:2584764
Created May 3, 2012 09:45
JavaScript: format number with leading zero
function formatNumber(number) {
return (number < 10 ? '0' : '') + number;
}
@neko-fire
neko-fire / post messages
Created March 12, 2018 15:19
post messages events listener for iframes
function msg(event){
console.log(event);
}
window.addEventListener('message', function(e{
console.log(e);
}));
@neko-fire
neko-fire / general .gitignore
Last active October 6, 2017 14:59
standard .gitignore file
# IDES & Editors
# --------------------
.settings/
.buildpath
.project
.idea/
nbproject/
gitupdate
gitignore
*~
@neko-fire
neko-fire / countdown.js
Created August 4, 2016 07:48
countdown & bg changer
$(function () {
var main = [];
var colors = ['#19ba5a', '#3c82f6', '#e93750', '#29353a', '#9449b3', '#ffdb00'];
var interval_time = 5000;
$('.main').each(function () {
main.push($(this).prop('id'));
});
var body = $('body');
@neko-fire
neko-fire / webpack watch timestamp
Created August 16, 2016 16:15
adding timestamp to webpack --watch
// add this to webpack config in plugin section
plugins: [
function() {
this.plugin('watch-run', function(watching, callback) {
console.log('Begin compile at ' + new Date());
callback();
})
}
]
@neko-fire
neko-fire / remove _MACOSX
Created November 19, 2013 10:40
Remove _MACOSX folder from Archive
zip -d Archive.zip __MACOSX/\*
@neko-fire
neko-fire / find file with specific size
Created October 30, 2013 13:57
Find files with size 50mb+
ls -lahS $(find / -type f -size +50000k)
@neko-fire
neko-fire / custom git config
Last active December 25, 2015 19:09
Super git config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = REPO_URL
[gui]
wmstate = normal
@neko-fire
neko-fire / Delivery date shopify
Created April 14, 2014 19:38
add to js and cart page
{{ 'http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' | stylesheet_tag }}
{{ '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' | script_tag }}
<div style="width:300px; clear:both;">
<p>
<label for="date">Pick a delivery date:</label>
<input id="date" type="text" name="attributes[date]" value="{{ cart.attributes.date }}" />
<span style="display:block" class="instructions"> We do not deliver during the week-end.</span>
</p>
</div>