Skip to content

Instantly share code, notes, and snippets.

View yanneves's full-sized avatar

Yann イーベス Eves yanneves

View GitHub Profile
function exportFileToPNG(dest, artBoardIndex)
{
var exportOptions = new ExportOptionsPNG24(); // or ExportOptionsPNG8
var type = ExportType.PNG24; // or ExportType.PNG8
var file = new File(dest + ".png");
exportOptions.artBoardClipping = true;
exportOptions.antiAliasing = true;
exportOptions.transparency = true;
exportOptions.qualitySetting = 72;
@nelsonpecora
nelsonpecora / autofillDirective.js
Last active December 31, 2015 06:19
Hacky directive that "fixes" autofill
// autofill catcher (super hacky, abandon all hope ye who enter here --np)
app.directive('autofill', ['$timeout', function($timeout) {
return {
restrict: 'A',
require: 'ngModel',
link: function( scope, elem, attrs ) {
var ownInput = false;
// trigger an input 500ms after loading the page (fixes chrome and safari autofill)
$timeout(function() {
@aheckmann
aheckmann / output
Last active January 21, 2020 10:12
Mongoose 3.6 population example
===========
mongoose version: 3.6.0rc0
========
dbname: testing_populateAdInfinitum
[ { title: 'blog 1',
author:
{ _id: 511bde3e3985283f25000004,
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@remy
remy / gist:2972478
Last active October 6, 2015 09:28
Student discounts on Full Frontal
Dear student,
I was a student once and I realise most of your budget is
set aside for booze. Our conference pass is £150+vat -
but £180 if you're paying yourself. Maybe that's too much
for you to afford, so how about a 50% discount and no VAT?
I've got 10 tickets available at £75.
It's first come first serve, but they're available today -
var express = require('express'),
request = require('request'),
BufferList = require('bufferlist').BufferList,
sys = require('sys');
var app = express.createServer(
express.logger(),
express.bodyDecoder()
);