Skip to content

Instantly share code, notes, and snippets.

View 3rdp's full-sized avatar

Alex Davydenko 3rdp

  • Ukraine
View GitHub Profile
@xem
xem / codegolf.md
Last active March 22, 2024 15:41
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

@WickyNilliams
WickyNilliams / index.html
Last active February 22, 2023 15:07
parseTable.js - convert HTML table to array of objects. MIT licensed (https://opensource.org/licenses/MIT)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>parseTable</title>
</head>
<body>
<table>
<thead>
<tr>
@miguelmota
miguelmota / slide-out-navigation.css
Last active April 28, 2022 00:10
A barebones slide out navigation using CSS3 translate. Blog post: http://www.miguelmota.com/slide-out-navigation-using-css3-translate/
/* Global styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
html, body {
height: 100%;
@willurd
willurd / web-servers.md
Last active May 7, 2024 04:58
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@syl20bnr
syl20bnr / evil-emacs-state-2-evil-normal-state.el
Last active April 29, 2020 10:00
evil-emacs-state is annoying, the following function and hook automatically switches back to evil-normal-state whenever the evil-emacs-state is entered. It allows a more consistent navigation experience among all mode maps. To enter special commands of custom mode maps, just enter the insert mode :-)
;; evil-emacs-state is annoying, the following function and hook automatically
;; switch back to evil-normal-state whenever the evil-emacs-state is entered.
;; It allows a more consistent navigation experience among all mode maps.
;; To enter special commands of custom mode maps, just enter the insert mode :-)
(defun evil-emacs-state-2-evil-normal-state ()
(evil-normal-state)
(remove-hook 'post-command-hook 'evil-emacs-state-2-evil-normal-state))
(add-hook 'evil-emacs-state-entry-hook
(lambda ()
(add-hook 'post-command-hook 'evil-emacs-state-2-evil-normal-state)))

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software