Skip to content

Instantly share code, notes, and snippets.

View langolf's full-sized avatar

Aleksandr Langolf langolf

View GitHub Profile
@langolf
langolf / gist:8691201
Last active August 29, 2015 13:55
Simple gulpfile
var gulp = require('gulp'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
autoprefixer = require('gulp-autoprefixer'),
csso = require('gulp-csso'),
imagemin = require('gulp-imagemin'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
clean = require('gulp-clean'),
@langolf
langolf / post.as
Created May 11, 2019 10:59
Kitty post command
tell application "System Events"
if frontmost of process "kitty" then
set visible of process "kitty" to false
else
set frontmost of process "kitty" to true
tell process "kitty"
set cmd to "command"
tell application "System Events"
keystroke cmd
@langolf
langolf / title.as
Created May 17, 2019 15:07
Get vscode title
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to application process "Code"
set frontAppName to name of frontApp
tell process frontAppName
tell (1st window whose value of attribute "AXMain" is true)
set windowTitle to value of attribute "AXTitle"
end tell
end tell
@langolf
langolf / opened_file.as
Created May 20, 2019 09:18
Get opened file for vscode
tell application "System Events"
tell application process "Code"
return value of attribute "AXDocument" of window 1
end tell
end tell
@langolf
langolf / font_cache.sh
Created October 14, 2019 10:49
Clear font cache for mac os
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping
@langolf
langolf / .macos
Last active April 25, 2022 02:52
Mac OSX config
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
@langolf
langolf / brew.sh
Last active July 30, 2020 13:50
Mac dotfiles
#!/usr/bin/env bash
if test ! "$( command -v brew )"; then
echo "Installing homebrew"
ruby -e "$( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
fi
# Install command-line tools using Homebrew.
# Make sure we’re using the latest Homebrew.
@langolf
langolf / white.json
Last active February 13, 2020 00:13
White theme
{
"$schema": "vscode://schemas/color-theme",
"type": "light",
"colors": {
"activityBar.background": "#ffffff",
"activityBar.border": "#00000000",
"activityBar.foreground" "#bec9d3",
"activityBarBadge.background": "#000000",
"activityBarBadge.foreground": "#ffffff",
"badge.background": "#000000",
@langolf
langolf / spec.json
Last active February 22, 2020 10:01
{
"id": "root",
"states": {
"Search Bar": {
"id": "Search Bar",
"states": {
"Inactive": {
"id": "Inactive",
"states": {},
"on": {