Skip to content

Instantly share code, notes, and snippets.

View miclaus's full-sized avatar
🕸️

Iosif Miclaus miclaus

🕸️
View GitHub Profile
@miclaus
miclaus / gulpfile.js
Last active December 5, 2015 17:42
Very simple gulp watch for coffeescript
/// requires
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
coffee = require('gulp-coffee'),
watch = require('gulp-watch');
/// dirs
var assets_dir = 'assets/';
var coffee_dir = assets_dir + 'coffee/',
@miclaus
miclaus / fh_password_change_bookmarklet.js
Last active April 4, 2017 16:35
Demonstrates simulated keyup event in vanilla JS. Tested in Chrome.
javascript:(function() {
var $ = document;
/// construct
var old_password = window.prompt('Old password', 'Old password');
var new_password = window.prompt('New password', 'New password');
element('old_password').value = old_password;
element('new_password').value = new_password;
@miclaus
miclaus / lib_remote-ftp.js
Last active August 29, 2015 14:23
Atom package Remote-FTP .ftpignore feature command
'remote-ftp:create-ignore-file' : function ()
{
if ( ! hasProject() ) return;
FS.writeFile(
atom.project.getDirectories()[ 0 ].resolve('.ftpignore'),
'## for example, this will be ignored on sync:\n.ftpignore',
function (err)
{
if ( ! err )
@miclaus
miclaus / menus_remote-ftp.cson
Last active August 29, 2015 14:23
Atom package Remote-FTP .ftpignore feature menu item
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Remote-FTP'
'submenu': [
{ label: 'Create FTP config file', command: 'remote-ftp:create-ftp-config' },
{ label: 'Create SFTP config file', command: 'remote-ftp:create-sftp-config' },
{ label: 'Create ignore file', command: 'remote-ftp:create-ignore-file' },
{ label: 'Toggle', command: 'remote-ftp:toggle' },
@miclaus
miclaus / panzoom.js
Created May 11, 2015 15:46
Panzoom implementation for Mobilot station content images
// NOTE - panzoom from: https://github.com/timmywil/jquery.panzoom
var scope = this;
var doubleTapTime = 600; // ms
$('#div_content .pictureZoomBox img.picture')
.panzoom(
{
startTransform : 'scale(1)',
increment : 0.4,
@miclaus
miclaus / keymap.cson
Created May 4, 2015 12:32
Delete forward Atom key binding when using Emmet
# delete forward bound to ctrl-backspace
# since ctrl-d (the default key binding for forward delete) is used by emmet
'.platform-darwin atom-text-editor:not([mini])':
'ctrl-backspace': 'core:delete'