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 />
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;
```
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
```
@marcj
marcj / gist:ab66f9e2cef2e6d5925e12b8885ab549
Last active November 17, 2019 20:22
Clean macOS for VMs
sudo mount -uw /
rm -rf /System/Library/Extensions/AMDRadeon*
rm -rf /System/Library/Extensions/GeForce*
rm -rf /System/Library/Desktop\ Pictures/*
find /System/Library/Templates/Data/System/Library/Speech -name PCMWave -exec rm -rf {} \;
rm -rf /System/Library/Screen\ Savers/*.saver
rm -rf /private/var/db/dyld