Skip to content

Instantly share code, notes, and snippets.

View schovi's full-sized avatar
👁️

David Schovanec schovi

👁️
View GitHub Profile
@bzamecnik
bzamecnik / cdwifi.sh
Last active July 9, 2023 17:30
Accept ČD Wifi on the command line (if you hate clicking). http://cdwifi.cz
#!/bin/bash
# Accept CD Wifi (Czech railways) on the command line (if you hate clicking).
# http://cdwifi.cz
#
# Put the script to ~/bin/cdwifi and make sure that export it's on the path: PATH=$PATH:~/bin
# Note that if you have a custom DNS set (eg. 8.8.8.8 or 1.1.1.1) they don't resolve
# cdwifi.cz. If you don't want to use their DNS set via DHCP for all your traffic
# the workaround here is to query their DNS server at the gateway just
# for this request.
#
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
@kokes
kokes / netflix-cs-audio.txt
Last active November 2, 2019 20:38
Filmy s českýma titulkama na Netflixu
Alexa & Katie
All or Nothing
Angel of the Lord 2
Another Life
Backstage
Barbie Dolphin Magic
Basketball or Nothing
Beats
Black Mirror
Captain Underpants: The First Epic Movie
@Aldredcz
Aldredcz / lightning-talk-proposal.md
Last active October 13, 2019 22:48
ReactiveConf - Lightning talk - Delightful Drag and Drop for complex interactive UIs

logo

Vojtech Prikryl (@productboard)

Delightful Drag and Drop for complex interactive UIs

Drag and Drop is undoubtedly one of the most popular and user-friendly interactions in software nowadays. There are plenty awesome libraries for DnD in React realm, covering most of the use cases. We tried them all at productboard, but realized we need something special for complex interfaces we are building. We developed our own solution that satisfied three main requirements we had:

  1. Delightful user experience 🤩
  2. Great performance even for large datasets 🏎
  3. Reusability of already existing code 🔌
// something like:
<BundleLink to="/profile" onLoadStart={() => {
// throw a spinner up on the "old" page while we load
this.setState({ navigating: true })
}}>Profile</BundleLink>
<BundleLink to="/dash" prefetch={true}>Dashboard</BundleLink>
///////////////////////////////////////////////////////
const BUNDLED_ROUTES = {
@karmi
karmi / README.markdown
Last active January 9, 2016 17:04
echo 'Přečti mi něco, prosím!' | ruby dictator.rb

A simple dictation robot.

echo 'Přečti mi něco, prosím!' | ruby dictator.rb

cat data.txt | ruby dictator.rb

cat data.txt | SPEED=1.5 ruby dictator.rb
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active April 2, 2024 20:18
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@bugcy013
bugcy013 / logstach Examples
Created April 26, 2014 00:09
logstach Examples collection
Example -1
=====================
input {
file {
path => [ "/usr/local/var/log/suricata/eve.json", "/var/log/ulogd.json" ]
codec => json
type => "json-log"
}
}
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.