Skip to content

Instantly share code, notes, and snippets.

😼
Cat face with wry smile

Alex Ivanov contributorpw

😼
Cat face with wry smile
Block or report user

Report or block contributorpw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View !SUMGMS.MD
@contributorpw
contributorpw / figure.html
Created Feb 5, 2019 — forked from budparr/figure.html
Hugo "figure" shortcode that works with https://github.com/aFarkas/lazysizes and uses `markdownify` for title and caption #gohugo
View figure.html
<!-- image -->
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}" {{ end }}{{ with .Get "width" }}width="{{.}}" {{ end }} class="lazyload" />
<noscript>
<img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}" {{ end }}{{ with .Get "width" }}width="{{.}}" {{ end }}/>
</noscript>
{{ if .Get "link"}}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>{{ if isset .Params "title" }}
View discord_ubuntu_dependencies.md
> sudo dpkg -i /tmp/discord-0.0.5.deb

Selecting previously unselected package discord.
(Reading database ... 161079 files and directories currently installed.)
Preparing to unpack /tmp/discord-0.0.5.deb ...
Unpacking discord (0.0.5) ...
dpkg: dependency problems prevent configuration of discord:
 discord depends on libappindicator1; however:
  Package libappindicator1 is not installed.
View !Получение строки для регулярного выражения.md

Получение строки для регулярного выражения

Рабочий код находится в файле run.gs. Чтобы проверить его работоспособность можно запустить код ниже в любом редакторе Google Apps Script.

function doit(){
  if ((typeof run)==='undefined') {
    var cs = CacheService.getScriptCache().get('cache');
    if(!cs){
      cs = UrlFetchApp
        .fetch('https://gist.githubusercontent.com/oshliaer/386844d1dc524605a1eec9e54c50d30e/raw/83ee38949c25993dc54b5f66721475ba0c7c3c70/run.gs')
View curlGmail.md
@contributorpw
contributorpw / cb-in
Created Jul 22, 2018 — forked from Gen2ly/cb-in
Copy file or pipe to Xorg clipboard
View cb-in
#!/bin/bash
# Copy file or pipe to Xorg clipboard
# Required program(s)
req_progs=(xclip)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@contributorpw
contributorpw / cb-out
Created Jul 22, 2018 — forked from Gen2ly/cb-out
Paste contents of Xorg clipboard to a file from the command line
View cb-out
#!/bin/bash
# Paste contents of Xorg clipboard to a file from the command line
filename=$@
pasteinfo="clipboard contents"
# Display usage if no parameters given
if [[ -z "$@" ]]; then
echo " ${0##*/} <filename> - paste contents of context-menu clipboard to file"
exit
@contributorpw
contributorpw / submit.md
Created Jul 2, 2018 — forked from tanaikech/submit.md
Benchmark: Search for Array Processing using Google Apps Script
View submit.md

Benchmark: Search for Array Processing using Google Apps Script

July 2, 2018

Kanshi Tanaike

Introduction

View !.md
You can’t perform that action at this time.