This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add a new span element to top of mdn | |
var new_header = document.createElement("span") | |
var new_header_content = document.createTextNode("new replacement span element") | |
new_header.appendChild(new_header_content) | |
var header = document.getElementById('main-header') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the 20 most used commands | |
# https://github.com/trimstray/the-book-of-secret-knowledge#tool-terminal | |
history | \ | |
awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | \ | |
grep -v "./" | \ | |
column -c3 -s " " -t | \ | |
sort -nr | nl | head -n 20 | |
# kill process running on port <port> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
box-sizing: border-box; | |
} | |
html { | |
/* font-family: 'Muli', sans-serif; */ | |
font-family: 'Ubuntu', sans-serif; | |
background: #EAEAEA; | |
color: #333; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set autoupdategist | |
set noautofocus | |
set nocncpcompletion | |
set smoothscroll | |
set hud | |
set noregex | |
set noinsertmappings | |
set typelinkhints | |
set defaultnewtabpage | |
let scrollduration = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['log', 'warn'].forEach(function(method) { | |
var old = console[method]; | |
console[method] = function() { | |
var stack = (new Error()).stack.split(/\n/); | |
// Chrome includes a single "Error" line, FF doesn't. | |
if (stack[0].indexOf('Error') === 0) { | |
stack = stack.slice(1); | |
} | |
var args = [].slice.apply(arguments).concat([stack[1].trim()]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set autoupdategist | |
set noautofocus | |
set nocncpcompletion | |
set smoothscroll | |
set hud | |
set noregex | |
set autoupdategist | |
set noinsertmappings | |
set typelinkhints | |
set defaultnewtabpage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && | |
python get-pip.py && | |
pip install fake2db && | |
cd $HOME && | |
fake2db --rows 1500 --db postgresql --name test_db && | |
psql test_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• building block map blockMapFile=release/SeeQL Setup 0.0.1.exe.blockmap | |
Error: /Users/t/seeql/node_modules/app-builder-bin/mac/app-builder exited with code 1 | |
at ChildProcess.<anonymous> (/Users/t/seeql/node_modules/builder-util/src/util.ts:244:14) | |
at Object.onceWrapper (events.js:288:20) | |
at ChildProcess.emit (events.js:200:13) | |
at maybeClose (internal/child_process.js:1021:16) | |
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) | |
From previous event: | |
at MsiTarget.light (/Users/t/seeql/node_modules/app-builder-lib/src/targets/MsiTarget.ts:105:142) | |
at /Users/t/seeql/node_modules/app-builder-lib/src/targets/MsiTarget.ts:89:16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from "react"; | |
const PetrasPage = (props) => { | |
const [lastScrollY, setLastScrollY] = useState(window.scrollY); | |
const [logoPosition, setLogoPosition] = useState("0px"); | |
useEffect(() => { | |
const handleScroll = () => { | |
const currentScrollY = window.scrollY; |
OlderNewer