Skip to content

Instantly share code, notes, and snippets.

View HazemKhaled's full-sized avatar

Hazem Khaled HazemKhaled

View GitHub Profile
@madsem
madsem / cd.yml
Last active November 12, 2023 10:09
GitHub Workflows For: Laravel CI with Mysql 8 & Laravel Vapor Deployment
name: Laravel Vapor CD
on:
release:
types: [ published, deleted ]
branches:
- master
jobs:
deploy_release:
runs-on: ubuntu-20.04
@mnapoli
mnapoli / README.md
Last active October 22, 2021 17:13
PrettyCI migration

This page will help you run continuous integration for PHP CodeSniffer and PHP-CS-Fixer using GitHub Actions.

To setup GitHub Actions in your repository, create a .github/workflows/ci.yml file in your repository and commit it.

The content of that file depends on the tool you want to run, please read the examples below.

Note: the examples below are provided to get you started easily, it is possible you may need to adjust them to fit your project.

php-cs-fixer

@tobydeh
tobydeh / moleculer-k8.md
Last active March 20, 2024 11:55
Moleculer k8 depoyment

Create a cluster on GKE:

gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4

Get credentials:

gcloud container clusters get-credentials backend

Build the docker image:

@itsariful
itsariful / ms-custom-tax-addon.php
Last active September 25, 2019 10:02
MS Custom Tax Addon
<?php
/**
* Plugin Name: MS Custom Tax Addon
* Description: This plugin implements a custom addon for MS to implement tax regardless of taxamo
* Author: Ariful Islam @ WPMUDEV
* Author URI: https://premium.wpmudev.org/profile/itsarifulislam
* License: GPLv2 or later
*/
@vonNiklasson
vonNiklasson / remove_old_gcloud_versions.sh
Last active January 16, 2024 16:04
Remove old Google App Engine versions
#!/bin/bash
# A bash script to remove old versions of a Google App Engine instance.
#
# Inspiration of script taken from:
# https://almcc.me/blog/2017/05/04/removing-older-versions-on-google-app-engine/
# Original code by Alastair McClelland and Marty Číž.
# Assembled and modified by Johan Niklasson.
#
# To run this script, execute
@danrubins
danrubins / README.md
Last active December 20, 2020 02:05
Legal Robot's options for helmet.js

Security Headers at Legal Robot

We're big fans of open source software at Legal Robot. We also know that getting security right is a tough job, so we want to share some of the useful tools we use to build and run Legal Robot and keep it secure.

We are also proud to run Legal Robot on the Meteor framework for Node.js. With this recent change, Helmet.js becomes the official recommendation for security headers in Meteor, replacing the previous Meteor browser-policy package.

One of the most helpful tools in our Meteor security toolbox at Legal Robot is Content Security Policy (CSP)  — basically, our server tells the browser what code it is allowed to run and how to handle something like code injection from a malicious browser extension.

CSP can be quite tricky, but there are some excellent tools out there to help, like [Google'

filter:
paths: ["app/code/{vendor-name-goes-here}/*", "vendor/{vendor-name-goes-here}/*"]
excluded_paths:
- "vendor/{vendor-name-goes-here}/{module-name-goes-here}/*"
- "app/code/{vendor-name-goes-here}/{module-name-goes-here}/*"
- '*.min.js'
before_commands:
tools:
php_code_sniffer:
config: { standard: 'Zend,PSR-1,PSR-2' }
@nuno
nuno / README.md
Last active May 31, 2020 06:21 — forked from grantges/README.md
Titanium TSS for Transparent NavigationBar / Shadow on iOS

Creating a transparent NavigationBar using Titanium Style Sheets

Appcelerator Titanium offers many ways to style the navigation bar for iOS apps, from changing out the title view all together, or just using simple colors. However, one of the most frequent requests I hear is how to make a truly transparent NavigationBar. This tutorial will cover that.

Getting started

Lets start with a pretty simple window style in the app.tss. This will ensure that the window style is applied globally.

Note: This can be used in a specific controller *.tss file if you only want this effect on a particular window.

@grantges
grantges / README.md
Created April 18, 2016 13:58
Titanium TSS for Transparent NavigationBar / Shadow on iOS

Creating a transparent NavigationBar using Titanium Style Sheets

Appcelerator Titanium offers many ways to style the navigation bar for iOS apps, from changing out the title view all together, or just using simple colors. However, one of the most frequent requests I hear is how to make a truly transparent NavigationBar. This tutorial will cover that.

Getting started

Lets start with a pretty simple window style in the app.tss. This will ensure that the window style is applied globally.

Note: This can be used in a specific controller *.tss file if you only want this effect on a particular window.

@falkolab
falkolab / actionBarMenuItem.js
Created November 5, 2015 21:23
Icon font MenuItem in ActionBar menu for Titanium SDK
var args = arguments[0] || {};
if(__parentSymbol) {
// recreate menu item
$.getTopLevelViews().length = 0;
__parentSymbol.removeItem(9999);
$.__views.menuItem = __parentSymbol.add(
_.extend(_.pick(args, Alloy.Android.menuItemCreateArgs), {
actionView: $.actionView
})