Skip to content

Instantly share code, notes, and snippets.

View zkwsk's full-sized avatar

Zaki Wasik zkwsk

  • Copenhagen, Denmark
View GitHub Profile
projects:
- name: 'your-project' # Name may contain lowercase letters, spaces, numbers, hyphens, and underscores
description: 'Your project description'
# List of totally customizable environments, e.g Test, Stage, QA, CI-CD
environments:
- name: 'Development' # Name may contain letters, spaces, numbers, hyphens, and underscores
slug: 'dev' # Slug may contain letters, numbers, hyphens, and underscores
configs:
- slug: 'dev' # First slug *must* match environment slug name

Variable types

With pen and paper write down what is logged out:

// Types
console.log(typeof 3);
console.log(typeof -33);
console.log(typeof '3');
const threeConst = 3;
console.log(threeConst);

Keybase proof

I hereby claim:

  • I am zkwsk on github.
  • I am zkwsk (https://keybase.io/zkwsk) on keybase.
  • I have a public key ASAdnXrtSu5x_Oh9OxkqD6Zt_Ti-FuIp0LWNb4Lwnx44cwo

To claim this, I am signing this object:

@zkwsk
zkwsk / gist:2da475090e6c924e2d565d548e9c2f81
Created October 19, 2017 10:53
HYF JS-1 Session 2 - Lesson
//Control flow if staments
//IF ELSE
/*
let number = 1;
if(number >= 3) {
console.log('This number is greater or equal to 3');
@zkwsk
zkwsk / gist:30c0fe7d3389b87893317eeefa8ef94f
Last active October 19, 2017 10:47
HYF JS-1 Session 2 - recap from last time
// Single line comment 1 + 1
/*
This is a multiline
comment
*/
// Data types
/*
@zkwsk
zkwsk / reimplement-jquery.md
Created July 23, 2017 15:17
Homework exercise - make your own implementation of jQuery.

Most modern javascript practices recommend avoiding jQuery, as there is a lot of overhead involved in loading jQuery. We have been teaching jQuery as an easy way to get started with manipulating the DOM and performing AJAX requests, but the purpose of this exercise is to learn to not rely on jQuery and at the same time learn how to build a library.

So at the end of this exercise you should have a library that you could drop in instead of jQuery.

First, have a look at this website which shows how to re-implement a lot of jQuery functions (http://youmightnotneedjquery.com). You are free to steal these implementations or to create your own, but it is suggested that you try not to steal anything you don't understand. For help you are always welcome to post on Slack, but try also to use sites like stackoverflow.com to get help from the outside community. It's generally much more efficient.

Second, have a look at the jQuery documentation for the functions below. Learn how each function works and try to do your o

module.exports = {
// http://eslint.org/docs/rules/
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"impliedStrict": false,
"experimentalObjectRestSpread": false,
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
@zkwsk
zkwsk / grunt-replace-illustrator
Created April 26, 2016 12:22
Configuration of grunt-replace to use Illustrator layer names as element classes in svg. Make sure you name your layers like this in Illustrator: class="some-class-name"
// Configuration of grunt-replace to use Illustrator layer names as element classes in svg
// Make sure you name your layers like this in Illustrator: class="some-class-name"
// ID cleanup: performs a manual ID cleanup as Illustrator exports is a mess
illustrator: {
src: ['svg/**/*.svg'],
dest: 'build/svg/',
replacements: [{
// Remove escaped underscore character
from: '_x5F_',