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 | |
if(isset($_POST['source'])) { | |
$source = $_POST['source']; | |
if(isset($_POST['type']) && 'php' == $_POST['type']) { | |
$code = highlight_string($source, true); | |
$output = $code; | |
} else { | |
$code = htmlentities($source); |
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
require 'open-uri' | |
namespace :rm2022_nodes_export do | |
desc 'Export for Roadmap 2020' | |
task export: :environment do | |
node_paths = %w[ | |
community | |
die-community/albert-lehmann | |
die-community/community-30676 | |
die-community/community-34487 |
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
import 'rxjs/add/observable/interval'; | |
import {Injectable} from '@angular/core'; | |
import {Headers, Http, Response as HttpResponse} from '@angular/http'; | |
import {Observable} from 'rxjs/Observable'; | |
import {Observer} from 'rxjs/Observer'; | |
import {Store} from '@ngrx/store'; | |
import {getIdentity, State} from '../../store/reducers'; | |
import {Identity} from '../auth/identity'; | |
import {I18nService} from '../i18n/service'; |
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 | |
for i in {0..28}; | |
do | |
firstPageNumber=$(expr \( $i \* 16 \) + 1) | |
lastPageNumber=$(expr $firstPageNumber + 15) | |
dest="$(printf "%04d\n" $firstPageNumber)-$(printf "%04d\n" $lastPageNumber).pdf" | |
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER \ | |
-dFirstPage=$firstPageNumber \ |
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
SELECT | |
CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / (1024 * 1024 * 1024), 2), | |
'G') DATA, | |
CONCAT(ROUND(index_length / (1024 * 1024 * 1024), 2), | |
'G') idx, | |
CONCAT(ROUND((data_length + index_length) / (1024 * 1024 * 1024), | |
2), | |
'G') total_size, |
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 | |
$sql = ''; | |
$pdo = Propel::getConnection(); | |
$stmt = $pdo->query('SHOW FULL TABLES'); | |
$tables = $stmt->fetchAll(PDO::FETCH_NUM); | |
foreach($tables as $tbl) { | |
$tblName = $tbl[0]; |
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
<pre><?php | |
class A { | |
private $a = 'trallala'; | |
protected $b = array(1,2,3); | |
public $foo = 'bar'; | |
} | |
class B extends A { | |
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
./configure \ | |
--prefix=/Users/andreas/Applications/PHP5 \ | |
--with-pear \ | |
--with-bz2=shared,/sw \ | |
--with-mcrypt=shared,/sw \ | |
--with-iconv-dir=/sw \ | |
--with-zlib-dir=/usr/local \ | |
--with-jpeg-dir=/sw \ | |
--with-png-dir=/sw \ | |
--with-gd=shared \ |