Skip to content

Instantly share code, notes, and snippets.

View Kaapiii's full-sized avatar

Markus Liechti Kaapiii

  • Payrexx AG
  • Switzerland
View GitHub Profile
@felipefernandes
felipefernandes / bitbucket-pipelines.yml
Last active February 10, 2021 16:14
Bitbucket pipeline for ftp deployment ( Node + Gulp + Bower + FTP + Rsync )
image: node:6.11.2
pipelines:
custom: # Pipelines that are triggered manually
deployment-to-production-init:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
- npm install -g gulp
@mcnamee
mcnamee / bitbucket-pipelines.yml
Last active December 14, 2023 03:57
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables.
# 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir)
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initialize GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all)
@AFelipeTrujillo
AFelipeTrujillo / addAttendee.php
Last active February 26, 2024 21:28
Use Google Calendar API
<?php
include_once 'google-api-php-client/vendor/autoload.php';
$client = new Google_Client();
$application_creds = 'service-account-credentials.json';
$credentials_file = file_exists($application_creds) ? $application_creds : false;
define("SCOPE",Google_Service_Calendar::CALENDAR);
define("APP_NAME","Google Calendar API PHP");
@krisnoble
krisnoble / deploy.php
Last active April 25, 2023 15:52
A slightly modified version of Brandon Summers' script. For more information: http://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';
@hissy
hissy / gist:4647258
Created January 27, 2013 07:39
[concrete5] Hardcoded Search block only search in current language site tree
<?php
Loader::model('section', 'multilingual');
$ms = MultilingualSection::getCurrentSection();
if (is_object($ms)) {
$lang = $ms->getLanguage();
$search = BlockType::getByHandle('search');
$search->controller->title = t('Site Search');
$search->controller->buttonText = t('Search');
@mnapoli
mnapoli / reference.yml
Last active January 12, 2023 00:08
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position