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
myprompt_precmd() { | |
setopt noxtrace noksharrays localoptions | |
local exitstatus=$? | |
local git_dir git_ref | |
psvar=() | |
[[ $exitstatus -ge 128 ]] && psvar[1]=" $signals[$exitstatus-127]" || psvar[1]="" | |
local TERMWIDTH | |
(( TERMWIDTH = ${COLUMNS} - 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
#!/bin/sh -e | |
# - create a root directory (into /var/local or similar, eg: apt-repos/) | |
# - create a somerepo.conf file (will be sourced by this script) | |
# | |
# # _URL+_DIR is the path to download the source Packages.gz | |
# # "Filename:" in Packages is relative to _URL (eg: _URL/pool/...) | |
# SRC_REPO_URL="http://some-url" | |
# SRC_REPO_DIR="dists/sid/main/binary-amd64" | |
# |
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 | |
public function actionMigrateUp() | |
{ | |
// https://github.com/samdark/yii2-webshell | |
// https://github.com/samdark/yii2-webshell/issues/3 | |
// https://github.com/tebazil/yii2-console-runner/blob/master/src/ConsoleCommandRunner.php | |
// https://stackoverflow.com/a/28820239/2498790 | |
/* // if exec() is available |
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
<!-- | |
Usage: | |
<relative-path from="${from}" to="${to}" | |
output="project_property" /> | |
--> | |
<adhoc-task name="relative-path"><![CDATA[ | |
class RelativePath extends Task { | |
private $from; | |
private $to; | |
private $output; |
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
# from gimp py fu console | |
# execfile("/path/to/this-script.py") | |
# for each layer use magic wand at pixel 1,1 (assume it is transparent), and create a selection, inverse it, transform to rectangle bounding box | |
# copy it and paste into a new image, save as png (and save the original coordinates into a json { "layer-name": [ x1, y1, x2, y2 ] } | |
from array import array | |
savepath="/tmp/slices/" | |
f = open("{0}images.json".format(savepath), "w") |
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
diff --git a/methods.go b/methods.go | |
index 55a6eca..7c997a7 100644 | |
--- a/methods.go | |
+++ b/methods.go | |
@@ -723,7 +723,7 @@ func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options map[string]int | |
// other options: parse_mode, disable_web_page_preview, and reply_markup | |
// | |
// https://core.telegram.org/bots/api#editmessagetext | |
-func (b *Bot) EditMessageText(text string, options map[string]interface{}) (result APIResponseMessage) { | |
+func (b *Bot) EditMessageText(text string, options map[string]interface{}) (result APIResponseBool) { |
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
-- generate thumbnail jpeg of the current selected frame using ffmpeg | |
-- name convention for minidlna or synology | |
-- install in ~/.local/share/vlc/lua/extensions/Thumbnail2.lua | |
-- tested on linux only | |
function descriptor() | |
return { | |
title = "Thumbnail2 generator"; |
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
/*! | |
* Bootstrap v3.3.6 (http://getbootstrap.com) | |
* Copyright 2011-2015 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-si |
OlderNewer