Skip to content

Instantly share code, notes, and snippets.

View webkonstantin's full-sized avatar

Konstantin L webkonstantin

View GitHub Profile
@webkonstantin
webkonstantin / osx_setup.sh
Created October 21, 2019 13:48 — forked from dannysmith/osx_setup.sh
Sensible defaults for New Mac
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@webkonstantin
webkonstantin / main.yml
Created December 28, 2018 18:32 — forked from ParagDoke/main.yml
Conditionally loop over multiple ansible tasks
---
- name: test
hosts: localhost
connection: local
tasks:
- name: Invoke poller
vars:
url: http://localhost:8000/abc.json
validate_certs: yes
poll_interval: 10
@webkonstantin
webkonstantin / osx-for-hackers.sh
Created December 1, 2016 01:02 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
<?php namespace App\Http\Middleware;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseMiddleware;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
// The first two functions are identical to the originals in the parent class
// other than the sections marked "MOD". The third function is a new helper