Skip to content

Instantly share code, notes, and snippets.

@AlexxIT
AlexxIT / yandex_station_call.md
Last active February 25, 2025 22:58
Звонок на колонку с Алисой

Создаём в Home Assistant карточку для быстрого звонка на колонку.

  1. Можно создать или просто карточку-кнопку:
type: button
icon: 'mdi:phone-classic'
tap_action:
  action: url
  # Яндекс > Устройства > Колонка > Дополнительная информация > Идентификатор устройства (регистр важен)
@mholt
mholt / macapp.go
Last active May 1, 2025 04:32
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@FranklinYu
FranklinYu / README.markdown
Last active May 3, 2025 10:13
links for old versions of Docker for Mac (inspired by docker/for-mac#1120)

links for old versions of Docker for Mac

Deprecated

Docker provides download links in release note. They promised that

(we) will also include download links in release notes for future releases.

Note:

@mkrakauer-rio
mkrakauer-rio / disable-full-sync-on-flush.sh
Last active June 12, 2022 14:52
Docker for Mac - Disable full disk sync on flush
cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
cat com.docker.driver.amd64-linux/disk/full-sync-on-flush
# if you see true, continue
echo false > com.docker.driver.amd64-linux/disk/full-sync-on-flush
cat com.docker.driver.amd64-linux/disk/full-sync-on-flush
# you should now see false
git add com.docker.driver.amd64-linux/disk/full-sync-on-flush
git commit -s -m "Disable flushing"
# wait for docker to restart
@kcdragon
kcdragon / fix-elasticsearch-red-status.sh
Created August 5, 2016 16:32
Fix ElasticSearch Red Status
# only tested on development machine
curl "localhost:9200/_cluster/health?level=indices&pretty=true" | grep -B 1 '"status" : "red"' | grep "{" | cut -d"\"" -f2 | while read -r line ; do curl -XDELETE localhost:9200/$line && echo; done
@chrismdp
chrismdp / s3.sh
Last active January 23, 2025 09:26
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@mischah
mischah / Gruntfile.js
Last active August 29, 2015 14:03
DalekJS Remote test execution
// JSHint settings
/* jshint camelcase: false, es3: false */
'use strict';
module.exports = function(grunt) {
// Get devDependencies
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
/*\
|*|
|*| :: cookies.js ::
|*|
|*| A complete cookies reader/writer framework with full unicode support.
|*|
|*| https://developer.mozilla.org/en-US/docs/DOM/document.cookie
|*|
|*| This framework is released under the GNU Public License, version 3 or later.
|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html
@zircote
zircote / AWS.js
Last active January 31, 2020 03:00
Google Script for Excel and AWS instance pricing + Reserved Instances
/**=
* User: zircote
* Date: 16/10/2013
* Time: 08:59
*/
var SERVICE_HOST = 'http://aws.amazon.com'
var data_sources = {
"linux-od": {
@brandonb927
brandonb927 / image-2x.less
Last active December 1, 2019 15:38
@2x LESS CSS Mixin
/**
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss
*
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property.
* - Updated retina media query to be more reliable ()
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up
* Update: 2012-12-29 - U