Skip to content

Instantly share code, notes, and snippets.

View philipborbon's full-sized avatar

Philip Borbon philipborbon

View GitHub Profile
@philipborbon
philipborbon / macos_high_sierra_apache_php_brew_2018.md
Created March 13, 2024 02:42 — forked from karlhillx/macos_high_sierra_apache_php_brew_2018.md
macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

Homebrew Installation

First let's install Homebrew.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

@philipborbon
philipborbon / ios-font-sizes.swift
Created September 2, 2021 09:23 — forked from zacwest/ios-font-sizes.swift
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
for style in styles {
@philipborbon
philipborbon / git-deployment.md
Last active January 22, 2023 09:06 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

iOS Swift - Cancellable Task with GCD

#iOSBySheldon

I think most of you guys know GCD pretty well. Basically, GCD is a high level API to handle multi-threading operations. We use GCD almost on daily basis to switch thread and execute codes like:

DispatchQueue.main.async { //execute some codes here } 
//switch to main queue and execute codes asynchronously

DispatchQueue.main.sync { //execute some codes here } 
//switch to main queue and execute codes synchronously
//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
@philipborbon
philipborbon / Robots Environment .htaccess
Created April 16, 2020 03:46 — forked from chadclark/Robots Environment .htaccess
Robots.txt for Staging and Production. By adding these rewrite rules to your .htaccess file, robots_dev.txt will be served as robots.txt on any non-production server.
RewriteEngine On
# Robots.txt for Staging and Production -- change productiondomain.com to the actual url of your production site
RewriteCond %{HTTP_HOST} !productiondomain.com$ [NC]
RewriteRule ^robots.txt robots_dev.txt [L]
@philipborbon
philipborbon / perms.md
Created April 16, 2020 01:43 — forked from stefanbc/perms.md
Set proper permissions on /var/www/

HOWTO

To set up permissions on /var/www where your files are served from by default:

sudo addgroup webmasters
sudo adduser $USER webmasters
sudo chown -R root:webmasters /var/www
sudo find /var/www -type f -exec chmod 664 {} \;
sudo find /var/www -type d -exec chmod 775 {} \;
@philipborbon
philipborbon / Laravel-Scheduler-Windows.md
Created January 16, 2020 12:08 — forked from Splode/Laravel-Scheduler-Windows.md
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@philipborbon
philipborbon / gist:a1ea020ebe70abe57673bc62b4c50d5c
Created November 27, 2019 00:50 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@philipborbon
philipborbon / sublime_projects.md
Created November 5, 2019 00:46
Create Projects in Sublime Text 3

Sublime Projects 📁

You can create Projects which contains multiple folders and can have individual settings depending on the project. A project is a folder or a group of folders saved at a certain state that will be remembered everytime you close the project.

You can also quick switch between projects with CMD + CTRL + P or CTRL + ALT + P

If your are using Atom or vscode there is a plugin to add this behavior: