Skip to content

Instantly share code, notes, and snippets.

View panlw's full-sized avatar
🎯
Focusing

Neo Pan panlw

🎯
Focusing
View GitHub Profile

auto_dark_mode.py

A script to update the color presets used by iTerm when the System Preferences -> General -> Apperance setting changes (either manually or via Automator).

Inspired by https://gist.github.com/jamesmacfie/2061023e5365e8b6bfbbc20792ac90f8

How to use

  1. In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
  2. Select Basic.
  3. Select Long-Running Daemon
@thinhhung
thinhhung / macosx-install-php-oracle-oci8.md
Last active June 1, 2018 03:15 — forked from gido/macosx-install-php-oracle-oci8.md
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8 - homebrew environnement

Installation

This procedure is tested on Mac OS X 10.12.5 with Developpers tools installed (xCode).

PHP 7.1 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@alexbonhomme
alexbonhomme / macosx-install-php-oracle-oci8-pdo_oci.md
Last active March 27, 2024 08:49 — forked from krisanalfa/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew
Relay Apollo
Built by Facebook (Check out the project on GitHub) Meteor (Check out the project on GitHub)
Frontend Technologies Requires React / React Native and configuration of Babel plugin Framework and platform agnostic (works with any JS framework such as React, Angular or Vue as well as on the native mobile platforms)
GraphQL API Requires a certain structure in the GraphQL schema Works with any GraphQL schema
Complexity Slow learning curve: Lots of powerful magic happening behind the scenes Low entrance barrier: Let's you get started quickly and involves more manual work for certain features
Flexibility Almost no flexibility, strict rules how to
@obatiuk
obatiuk / tomcat.service
Created February 24, 2017 05:54
Example systemd unit file for tomcat 7.x
# Systemd unit file for tomcat 7.x
[Unit]
Description=Apache Tomcat 7.x Web Application Container
Wants=syslog.target network.target
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/java/latest
@pdanford
pdanford / README.md
Last active September 10, 2024 20:46
Launching iTerm2 from macOS Finder

Launching iTerm2 from macOS Finder

(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)

The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.

pdanford - April 2020


@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
Usage...
Vcxsrv [:<display>] [option]
:display-number
Vcxsrv runs as the given display-number, which defaults to 0.
To run multiple instances, use unique display-numbers.
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level

From zero to microservice with 𝚫 now

The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.

It uses Open Source tools that are widely available, tested and understood:

  • Node.JS
  • NPM
  • Express
@subfuzion
subfuzion / curl.md
Last active September 22, 2024 09:45
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.