This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # Put this file in the root of your Rails project, | |
| # then run it to output the SQL needed to change all | |
| # your tables and columns to the same character set | |
| # and collation. | |
| # | |
| # > ruby character_set_and_collation.rb | |
| DATABASE = '' |
This file contains hidden or 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/bash | |
| # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
| # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
| ############################################### | |
| # To use: | |
| # wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
| # chmod 777 install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| echo "*****************************************" |
This file contains hidden or 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
| #coding: utf-8 | |
| #別名メソッドに気をつけよう。 | |
| #たとえば | |
| #array.mapとarray.collectは同じメソッドです。 | |
| #自己破壊メソッドはポインタ参照が変わらないため、変数bは変数aの内容を表示する。 | |
| a = [1,2,3] | |
| b = a | |
| a.reverse! | |
| p b |
This file contains hidden or 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
| require 'base64' | |
| require 'digest' | |
| require 'openssl' | |
| module AESCrypt | |
| def AESCrypt.encrypt(password, iv, cleardata) | |
| cipher = OpenSSL::Cipher.new('AES-256-CBC') | |
| cipher.encrypt # set cipher to be encryption mode | |
| cipher.key = password |
This file contains hidden or 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
| files: | |
| "/etc/nginx/conf.d/000_APP_NAME.conf": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| upstream APP_NAME_app { | |
| server unix:///var/run/puma/my_app.sock; | |
| } |
This file contains hidden or 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
| import UIKit | |
| import SnapKit | |
| class ViewController: UIViewController { | |
| var scrollView: UIScrollView! | |
| var stackView: UIStackView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
This file contains hidden or 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 golang:1.12-alpine as builder | |
| ARG VERSION=2.3.930.0 | |
| RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash && \ | |
| curl -sLO https://github.com/aws/amazon-ssm-agent/archive/${VERSION}.tar.gz && \ | |
| mkdir -p /go/src/github.com && \ | |
| tar xzf ${VERSION}.tar.gz && \ | |
| mv amazon-ssm-agent-${VERSION} /go/src/github.com/amazon-ssm-agent && \ | |
| cd /go/src/github.com/amazon-ssm-agent && \ | |
| echo ${VERSION} > VERSION && \ | |
| gofmt -w agent && make checkstyle || ./Tools/bin/goimports -w agent && \ |
I want to open PDF files with Zathura on Mac. Problem is - Zathura does not have a proper App Bundle. So you cannot go in Finder to a pdf file, navigate to ‘Get Info’ and set pdf files to be opened with Zathura.
Luckily, you can create a custom App Bundle that wraps up a script that does that
But that is not as straightforward as you think it is, you can’t just execute a shell script. What if the file already opened with one of the instances of zathura process? Since Zathura is not a native OSX app, it will create a new process instance every time you open it.
The following script opens a file in Zathura, and if it was already opened, it would only activate the right window.