Skip to content

Instantly share code, notes, and snippets.

View hinok's full-sized avatar

Dawid Karabin hinok

View GitHub Profile
@hinok
hinok / private_fork.md
Created August 30, 2023 21:56 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@hinok
hinok / gist:98c9a48d6163c376faca8bb0ecf550fc
Last active September 16, 2021 22:14
Bookmarked type foundries
Type foundries, random order
https://vllg.com/
https://www.type-together.com/
https://fontbureau.typenetwork.com/
https://www.typotheque.com/
https://houseind.com/fonts
https://processtypefoundry.com/
https://lineto.com/
https://www.dardenstudio.com/typefaces
https://www.mvbfonts.com/browse/fonts
@hinok
hinok / modernizr-2.8.3.js
Created August 19, 2017 18:20
Modernizr 2.8.3 with all feature-detects
/*!
* Modernizr v2.8.3
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
* Available under the BSD and MIT licenses: www.modernizr.com/license/
*/
/*
* Modernizr tests which native CSS3 and HTML5 features are available in
@hinok
hinok / .zshrc
Last active August 29, 2015 14:23 — forked from SlexAxton/.zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

import Ember from 'ember';
var get = Ember.get;
export default Ember.Component.extend({
didInsertElement: function(){
Ember.$(document).bind('click', this.closeThis);
},
closeThis: function(event) {
@hinok
hinok / gist:a3d413004df3e1ff4bb0
Created January 18, 2015 14:36
Improved {{#each}} for Ember 1.9 / Handlebars 2.0.0
/**
A replacement for #each that provides an index value (and other helpful values) for each iteration.
Unless using `foo in bar` format, the item at each iteration will be accessible via the `item` variable.
Simple Example
--------------
```
{{#eachIndexed bar in foo}}
{{index}} - {{bar}}
{{/#eachIndexed}}
/**
* Module dependencies
*/
var util = require('util'),
actionUtil = require('../../node_modules/sails/lib/hooks/blueprints/actionUtil');
/**
* Find Records
*
@hinok
hinok / SassMeister-input.scss
Last active April 7, 2017 10:45
Generated by SassMeister.com.
//
// I created standalone package, look here
//
// https://github.com/hinok/spejson
//
// ----
// libsass (v3.0.2)
// ----

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>