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 | |
# Sets up a new Ubuntu installation with good things | |
# Desktop and Server are supported | |
# Detect Ubuntu version | |
distro="server" | |
(dpkg -s "ubuntu-desktop" && distro="ubuntu") > /dev/null 2>&1 | |
(dpkg -s "xubuntu-desktop" && distro="xubuntu") > /dev/null 2>&1 | |
(dpkg -s "kubuntu-desktop" && distro="kubuntu") > /dev/null 2>&1 |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#ffca2a, 6.5%)", | |
"@brand-success": "#5cb85c", |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "#e89b2f", | |
"@brand-success": "#5cb85c", |
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
<?php | |
/** | |
* DirectCallToMagicMethodConstruct.php | |
* | |
* PHP 5.4.13 (cli) (built: Mar 15 2013 02:05:59) | |
* Copyright (c) 1997-2013 The PHP Group | |
* Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | |
* with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans | |
*/ |
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
/* This is a hacky stylesheet for making GPM not so ugly. */ | |
/* Fix GPMDB's playlist nav on dark themes */ | |
#playlist-drawer paper-header-panel[at-top] paper-toolbar:not([style-scope]):not(.style-scope), | |
#playlist-drawer .autoplaylist-section, | |
#playlist-drawer #recent-playlists-container { | |
border-bottom-color: <<BACK_SECONDARY>>; | |
} | |
/* Remove Hero image */ |
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
#!/usr/bin/env php | |
<?php | |
if (empty($argv[1]) || $argv[1] == '-h') { | |
exit ("Usage: markov <input file> [words] [prefix] [minWords]\n"); | |
} | |
$text = file_get_contents($argv[1]); | |
$map = map($text); | |
$words = $argv[2] ?? 20; | |
$minWords = $argv[4] ?? 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
import random | |
def build_model(tokens, n): | |
"Builds a Markov model from the list of tokens, using n-grams of length n." | |
model = dict() | |
if len(tokens) < n: | |
return model | |
for i in range(len(tokens) - n): | |
gram = tuple(tokens[i:i+n]) | |
next_token = tokens[i+n] |
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 r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document regexp("https?://([^:]+)(:[0-9]+)?/transmission/web/.*") { | |
* { | |
background-color: transparent !important; | |
color: inherit !important; | |
border-color: var(--border-color) !important; | |
} | |
body, div.dialog_container div.dialog_window, .inspector-tab, div#jqContextMenu ul, .ui-widget-content { |
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
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} } |
OlderNewer