Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Viktor Sokyrko viksok

🏠
Working from home
Block or report user

Report or block viksok

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rest-spread-tricks-05.js
const user1 = {
id: 100,
name: 'Howard Moon',
password: 'Password!'
}
const removeProperty = prop => ({ [prop]: _, ...rest }) => rest
// ---- ------
// \ /
// dynamic destructuring
View safari-reaper.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@ajdruff
ajdruff / fix-git-line-endings
Last active Dec 9, 2019
Forces all line endings to LF in your git repo.
View fix-git-line-endings
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@ValdikSS
ValdikSS / huawei-fw-list.txt
Last active Dec 7, 2019
Huawei firmware files found on update server
View huawei-fw-list.txt
==========================================================================
DO NOT WRITE ANY QUESTIONS IN COMMENTS
==========================================================================
This is not appropriate place for discussions. Keep this list FW-only.
I do NOT have any firmware files apart from published here or on 4pda. Please do not contact me for firmware files requests.
This is a list of files found on Huawei update server by brute-forcing URL parameters.
Some firmware files have changelogs. Just change file name to "changelog.xml" in the end of the URL.
@zimmi88
zimmi88 / gist:3dbac8f8a035bd6fe8d4
Created Jul 17, 2014
Hopscotch Plugins proposal
View gist:3dbac8f8a035bd6fe8d4

Hopscotch Plugins

Purpose

Tour and step callbacks work well for individual tour or step cases, but we'd like to provide a means by which developers and integrators can hook in additional functionality into Hopscotch without adding code or config bloat to the core library.

Good examples of functionality that could leverage a plugin API:

  • PR #76: Add a modal box that highlights what the current step points to.
  • PR #104: Additional event handlers for tours.
@naholyr
naholyr / run-casper.sh
Created Jul 12, 2012
Click on checkbox with CasperJS
View run-casper.sh
casperjs test test-checkbox.js
@alanhogan
alanhogan / compass-retina-sprites.scss
Created Jun 5, 2012 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
View compass-retina-sprites.scss
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
You can’t perform that action at this time.