This file contains 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
stages: | |
- test | |
# Variables: these have to match | |
# the .env.example credentials in your Laravel app | |
# use the default homestead/secret combination, since | |
# that database gets created in the edbizarro/gitlab-ci-pipeline-php:7.1 | |
# docker image. | |
variables: | |
MYSQL_ROOT_PASSWORD: root |
This file contains 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
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class Transactional | |
{ | |
public function handle($request, Closure $next) | |
{ |
This file contains 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
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 |
This file contains 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 | |
set -e | |
[ -z "$DEBUG" ] || set -x; | |
usage() { | |
echo "$0 <repo> <tag> [<release name>] [-- <asset>...]" >&2; | |
} | |
if [ "$1" = "-h" -o "$1" = "--help" ]; then |
This file contains 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
outputDir=/tmp/screenshots/framed | |
mkdir -p ${outputDir} | |
########## | |
# iPhone # | |
########## | |
padPath=/tmp/iphone-pad.png | |
convert -size 1125x185 xc:#e65562 ${padPath} | |
for filePath in $(find /tmp/screenshots/ | grep iPhone | grep -v framed) ; do |
This file contains 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 | |
# ===> Set these variables first | |
branch="$GIT_BRANCH" | |
# Example: "Jaskaranbir/MyRepo" | |
repo_slug="$TRAVIS_REPO_SLUG" | |
token="$GITHUB_TOKEN" | |
version="$TRAVIS_TAG" | |
# An automatic changelog generator |
This file contains 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 python3 | |
# Joonas Kuorilehto 2013 | |
# This script is Public Domain. | |
import csv | |
import subprocess | |
import pipes | |
from datetime import datetime | |
import smtplib |
This file contains 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
server { | |
client_body_in_file_only clean; | |
client_body_buffer_size 32K; | |
client_max_body_size 300M; | |
sendfile on; | |
send_timeout 300s; | |
# Port that the web server will listen on. | |
#listen 80; |
This file contains 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 | |
# check internet connectivity status | |
# file 'status' contains last known status (online or offline) | |
# file 'status.log' has an entry every time status changes | |
source ./status | |
echo "last status: $status at $time" | |
if nc -zw1 google.com 443; then | |
echo "online" | |
if [[ "$status" = "online" ]]; then |
This file contains 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
#Tested with Samsung Galaxy Note 3 (your mobile phone may have different paths and partitions!!) | |
#check adb connection... | |
adb devices | |
#copy the boot.img image to the mobile phone (in this case, the root of the SD Card) | |
adb push <path_to_your_boot.img_extracted_from_custom_rom_zip>/boot.img /external_sd/boot.img | |
#open shell | |
adb shell |
NewerOlder