How to make an application icon for macOS using
iconset&iconutil
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
| [Mosquitto] | |
| title=Mosquitto | |
| description=Mosquitto mqtt broker port 1883/tcp | |
| ports=1883/tcp | |
| [Mosquitto-TLS] | |
| title=Mosquitto TLS Only | |
| description=Mosquitto secure mqtt broker port 8883/tcp | |
| ports=8883/tcp |
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 pandas as pd | |
| import pandas.io.sql as sqlio | |
| import psycopg2 | |
| conn = psycopg2.connect("host='{}' port={} dbname='{}' user={} password={}".format(host, port, dbname, username, pwd)) | |
| sql = "select count(*) from table;" | |
| dat = sqlio.read_sql_query(sql, conn) | |
| conn = None |
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
| Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file| | |
| certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
| config_dir = File.dirname(file) | |
| connection_name = nil | |
| new_config = [] | |
| File.read(file).lines.each do |line| | |
| line.strip! | |
| if line.start_with?('#viscosity name') |
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/sh | |
| # Configure homebrew permissions to allow multiple users on MAC OSX. | |
| # Any user from the admin group will be able to manage the homebrew and cask installation on the machine. | |
| # allow admins to manage homebrew's local install directory | |
| chgrp -R admin /usr/local | |
| chmod -R g+w /usr/local | |
| # allow admins to homebrew's local cache of formulae and source files | |
| chgrp -R admin /Library/Caches/Homebrew |
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 bash | |
| # install mdbtools first! | |
| # mdbtools: https://github.com/brianb/mdbtools | |
| # ref: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL | |
| DBMS=postgres | |
| for MDB in `ls | grep .mdb$` |
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
| # NullStorage provider for CarrierWave for use in tests. Doesn't actually | |
| # upload or store files but allows test to pass as if files were stored and | |
| # the use of fixtures. | |
| class NullStorage | |
| attr_reader :uploader | |
| def initialize(uploader) | |
| @uploader = uploader | |
| end |
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
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
NewerOlder
