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
// hide all | |
datasheets = $('.datasheet.pagebreak') | |
for (let i = 0; i < datasheets.length; i++) { | |
datasheets[i].style.setProperty('display', 'none'); | |
datasheets[i].style.setProperty('margin-bottom', '6px'); | |
} | |
// make content overview noprint | |
$('.contents_header')[0].parentNode.parentNode.classList.add("noprint"); | |
// remove br and h2 |
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
$ elasticsearch --v | |
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release | |
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release | |
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] | |
output: | |
error: | |
Unrecognized VM option 'UseConcMarkSweepGC' | |
Error: Could not create the Java Virtual Machine. | |
Error: A fatal exception has occurred. Program will exit. |
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
//visit https://www.bricklink.com/v3/designer-program/introducing.page | |
//and type this in the console: | |
blapp.models.models.models.map(function(e) { | |
e = 'Model: ' + e.strModelName + ' LegoProductId: ' + e.nLegoProductId; | |
return e; | |
}); | |
//you will get the projects infos: | |
Array(31) [ "Model: 1950s Diner LegoProductId: 0", "Model: Train Station: Studgate LegoProductId: 0", "Model: Kakapo LegoProductId: 910017", "Model: Seasons in Time: Calendar LegoProductId: 0", "Model: Quest Builder LegoProductId: 0", "Model: Castle in the Forest LegoProductId: 910001", "Model: Winter Chalet LegoProductId: 0", "Model: Working Waterfall LegoProductId: 0", "Model: Venetian Houses LegoProductId: 0", "Model: The Dive Shop LegoProductId: 0", … ] | |
0: "Model: 1950s Diner LegoProductId: 0" | |
1: "Model: Train Station: Studgate LegoProductId: 0" |
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
SELECT | |
TABLE_NAME AS `Table`, | |
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` | |
FROM | |
information_schema.TABLES | |
WHERE | |
TABLE_SCHEMA = "<schema_name>" | |
ORDER BY | |
(DATA_LENGTH + INDEX_LENGTH) | |
DESC; |
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
#!/bin/bash | |
curling(){ | |
echo "curling" $1 | |
curl <whatever you want to curl> | |
} | |
# For loop 50 times | |
for i in {1..50} | |
do |
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
function ruby_v() { | |
if [ -n "$(ls -A ./Gemfile 2>/dev/null)" ] | |
then | |
echo "${$(ruby_prompt_info)/ruby-/ }" | |
fi | |
} | |
function fg_c_code() { | |
echo "\\033[38;5;$1m" | |
} |
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
// ==UserScript== | |
// @name Bricklink Catalog Page link to MyInventory | |
// @version 3 | |
// @grant none | |
// ==/UserScript== | |
var addToInventory = document.getElementById('_idAddToMyInvLink'); | |
if (addToInventory) { | |
var searchLink = addToInventory.href.replace('inventory_add','inventory_detail').replace('itemId=','q='); |
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
COLUMNS=250 | |
NORMAL="\[\033[00m\]" | |
YELLOW="\[\033[33m\]" | |
RED="\[\033[31m\]" | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "⚡️" | |
} |
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 from 'react'; | |
import * as My from './components/my-components.js'; | |
export default class App extends React.Component { | |
render() { | |
return ( | |
<div> | |
<My.Foo /> | |
<My.Bar /> |
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
# blog post: http://blog.slashpoundbang.com/post/2613268281/changing-from-tz-database-identifiers-to-rails-friendly | |
{ | |
"Australia/Adelaide" => "Adelaide", | |
"Australia/Broken_Hill" => "Adelaide", | |
"America/Anchorage" => "Alaska", | |
"America/Juneau" => "Alaska", | |
"America/Nome" => "Alaska", | |
"America/Yakutat" => "Alaska", | |
"Pacific/Gambier" => "Alaska", | |
"Asia/Almaty" => "Almaty", |
NewerOlder