Skip to content

Instantly share code, notes, and snippets.

View marcj's full-sized avatar
🖌️
Data

Marc J. Schmidt marcj

🖌️
Data
View GitHub Profile
<?php
class Issue651Test extends PHPUnit_Framework_TestCase
{
public function testIndex()
{
$updatedSchema = '
<database>
<table name="notification_type">
..
Include /etc/apache2/vhost-macro.conf
Include /srv/vhosts
@marcj
marcj / gist:6094735
Created July 27, 2013 12:27
TinyMCE fix #5881SharePrint. iOs/iPad focus bug.
diff -ur a/js/tinymce/classes/Editor.js b/js/tinymce/classes/Editor.js
--- a/js/tinymce/classes/Editor.js 2013-07-18 14:13:44.000000000 +0200
+++ b/js/tinymce/classes/Editor.js 2013-07-27 14:24:58.000000000 +0200
@@ -1009,6 +1009,12 @@
self.getWin().focus();
}
+ if (document != self.getDoc()) {
+ //WebKit in iOs needs a window focus call if the current document is different than self.getDoc()
+ //in inline mode. Scenario: create a inline editor of a contentEditable div inside a iframe.
<?php
$loader = require_once __DIR__ . '/../vendor/autoload.php';
include __DIR__ . '/generated-conf/config.php';
$loader->add('', __DIR__ . '/generated-classes');
\Propel\Runtime\Propel::disableInstancePooling();
$con = \Propel\Runtime\Propel::getConnection('bookstore');
@marcj
marcj / gist:dda218b489cedc5cc3e8
Last active May 18, 2016 21:09
AngularJS Cheatsheet

AngularJS Cheatsheet

Pitfalls

Scope does not detect changes with whitespace at the end and beginning

A: You need to set ng-trim to false.

   <input ng-model="model.name" ng-trim="false />
@marcj
marcj / do-it.sh
Last active April 12, 2020 08:47
OSX PhpStorm, better performance - more FPS using OpenGL
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde*
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions
From previous released tag to latest tag:
PREVIOUS=`git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1)`
CURREN_TAG=`git describe --abbrev=0 --tags`
git log --format="%h - %s <%an>" "$PREVIOUS..$CURREN_TAG"
Format:
git log --format="%h - %s <%an>" "1.2.0..master"
import time
import math
import aetros.backend
job = aetros.backend.start_job('marcj/example-1', '----')
logging_channel = job.create_channel('logging_channel', type=aetros.backend.JobChannel.TEXT)
traces = [
{
@marcj
marcj / gist:5e74e4a20205509fe9d7bdbe2d961699
Last active February 1, 2017 00:26
Install AETROS on Windows 10
sudo apt-get install libblas3 libblas-dev
sudo apt-get install liblapack3gf liblapack-dev
sudo apt-get install gfortran
sudo apt-get install libhdf5-dev
sudo chmod -R o+w /usr/local/lib/python2.7/dist-packages
sudo chmod -R o+w /usr/local/bin
pip install numpy
@marcj
marcj / Bla2.ts
Last active February 17, 2019 17:21
Typescript creating a new deep subtype based on runtime arguments.
interface Writer {
id: number;
username: string;
notIncludedAsWell: string;
}
interface Post {
id: number;
content: string;
notIncluded: string;