Skip to content

Instantly share code, notes, and snippets.

View GabLeRoux's full-sized avatar
:shipit:
Shipping code for humans ✌

Gabriel Le Breton GabLeRoux

:shipit:
Shipping code for humans ✌
View GitHub Profile
@niepi
niepi / osx_php_homebrew.setup.md
Created February 28, 2012 13:23
OSX PHP Homebrew Setup

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna
@creaoy
creaoy / extract-testflight.js
Created November 30, 2015 21:11 — forked from larsparendt/extract-testflight.js
Extract TestFlight user email addresses from iTunes Connect
//Make sure you scroll down to get all data loaded
var text = '';
$('.col-email').each(function(index,el) {
if (index == 0) {
text = 'Email, First Name, Last Name\n';
}
else {
//Email
text = text + $.trim($(el).find("a").text()) + ',';
//First Name
@rduplain
rduplain / app.py
Created January 19, 2012 17:28
Plot a PNG using matplotlib in a web request, using Flask.
"Plot a PNG using matplotlib in a web request, using Flask."
# Install dependencies, preferably in a virtualenv:
#
# pip install flask matplotlib
#
# Run the development server:
#
# python app.py
#
@mattlong
mattlong / admin.py
Created September 17, 2014 18:26
Add a custom admin page for a model and link to it from the detail page
from functools import update_wrapper
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.core.exceptions import PermissionDenied
from django.shortcuts import render
from myapp.models import Widget
from myapp.forms import ManageWidgetForm
@GabLeRoux
GabLeRoux / Install-php-mysql-apache-on-osx-with-brew.md
Last active September 6, 2021 15:35 — forked from niepi/osx_php_homebrew.setup.md
Detailed steps to install PHP, MySQL, Apache and some usefull extensions such as xDebug on a mac running Mac Os X. Also included: PostgreSQL.

Install PHP, MySQL, PostgreSQL, Apache and xDebug on a Mac

You should have some tools installed like Homebrew, a text editor such as Sublime Text and it's subl command line app inside a bin folder and some basic terminal knowledge.

This gist is a more detailed version of niepi's gist with things that worked for me. It may help someone :)

Install PHP

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
@wilsonwc
wilsonwc / stateMock.js
Created January 10, 2014 17:24
Angular Mock for properly resolving ui-router $state in Karma unit tests
angular.module('stateMock',[]);
angular.module('stateMock').service("$state", function($q){
this.expectedTransitions = [];
this.transitionTo = function(stateName){
if(this.expectedTransitions.length > 0){
var expectedState = this.expectedTransitions.shift();
if(expectedState !== stateName){
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName );
}
}else{
@Betree
Betree / README.md
Created August 19, 2017 05:30
Verify Gitlab CI config (.gitlab-ci.yml) using command line

Test your CI config upon Gitlab.com API

You need to install js-yaml-cli first :

npm install -g js-yaml-cli

Example :

> ./check_gitlab_ci.sh
{"status":"invalid","errors":["variables config should be a hash of key value pairs"]}%  
@iansym
iansym / jsonview-solarized.css
Last active September 13, 2022 21:33
JSON View solarized theme for Chrome Extension
body {
background-color: #002b36;
color: #839496;
font-size: 14px;
white-space: pre !important;
font-family: "Source Code Pro", monospace;
}
.property {
font-weight: bold;
@jerricko
jerricko / azure-pipelines.yml
Last active October 4, 2022 17:24
GameCI Azure Pipeline
# IMPORTANT NOTES
# This workflow was ported over from the gitlab example: https://gitlab.com/game-ci/unity3d-gitlab-ci-example/
# There may be better ways to do this, but this is what I came up with in a short timespan
# Azure creates its own user to inject into docker containers which causes weird problems with containers that don't have
# sudo installed. As you'll see in the game-ci containers, we install sudo before our scripts because otherwise, they run
# into all kinds of permission errors. Related issue: https://github.com/microsoft/azure-pipelines-agent/issues/2043
# Unity License string needs to be stored as a base64 string in order to work.
# See https://game.ci/docs/troubleshooting/common-issues#the-digital-signature-is-invalid
trigger:
- develop
@mhulse
mhulse / ssh tunneling.md
Last active July 26, 2023 15:22
SSH Tunneling: Map port from remote machine to your local machine so you can work from the remote DB (example using Django DB settings)...

SSH Tunneling

  1. In your local_settings.py file:

    DATABASES = {
    	'default': {
    		'ENGINE': 'django.db.backends.postgresql_psycopg2',
    		'NAME': 'django_%s' % (PROJECT_NAME,),
    

'USER': xxxx,