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 | |
class myWidgetContentCkEditorView extends dmWidgetContentCkEditorView | |
{ | |
const LINK_REGEX = '#href="(http?://)?(/)?(?<link_data>(\w+/\w+)|(page:\d+))(\s[\w\s-]+)?"#'; | |
public function doRender() | |
{ | |
return preg_replace_callback(self::LINK_REGEX, array($this, 'doLinks'), parent::doRender()); | |
} | |
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 | |
/* | |
* This file is part of the symfony package. | |
* (c) Fabien Potencier <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
namespace DG\CommonBundle\Model; | |
/** | |
* QueryFactory to satisfy PHPSpec | |
* | |
* @author Ivan Plamenov Tanev aka CraftyShadow <[email protected]> | |
*/ | |
class QueryFactory |
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
# Based on: https://gist.github.com/TylerRick/1961638 | |
# | |
# vim: set ft=sh | |
# | |
# This script automatically bootstraps the system with everything it needs to run chef-solo. | |
# Note: This should only do the absolute minimum necessary to get chef-solo (and your recipes) | |
# working. All else should be done via chef recipes. | |
#=================================================================================================== | |
# Config |
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 | |
# List all opened files using only the /proc fs. | |
main() { | |
pids | file_descriptor_folder | xargs ls -l | remove_ls_total_lines | remove_ls_file_attributes | remove_non_files | less | |
} | |
pids() { | |
# we try all pids from 1 to the pid max and echo out the valid ones | |
for P in $(seq 1 $(cat /proc/sys/kernel/pid_max)); do |
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
#!/usr/bin/env ruby | |
require "optparse" | |
require "ostruct" | |
require "nokogiri" | |
require "uri" | |
require "open-uri" | |
require "net/http" | |
options = OpenStruct.new |
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
#!/usr/bin/env bash | |
# required stuff | |
yum -y groupinstall "Development Tools" | |
yum -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison | |
# maybe? | |
# yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick | |
# ruby p353 |
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
MIT License | |
Copyright (c) 2017 Ivan Tanev <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
#!/usr/bin/env bash | |
set -eu -o pipefail | |
# set -x | |
REMOVE_ORIGINALS=${REMOVE_ORIGINALS="0"} | |
ROMANIZED_DIR=${ROMANIZED_DIR="romanized"} | |
mkdir -p "$ROMANIZED_DIR" |
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 fromPairs from 'lodash/fromPairs' | |
export type SafeForFormik<T extends { [key in string]: any }> = { | |
safe: { [keyWithoutDots in string]: T['key in string'] } | |
originalToSafeKeyDict: { [key in string]: string } | |
safeToOriginalKeyDict: { [keyWithoutDots in string]: string } | |
getBySafeKey: (data: T, keyWithoutDots: string) => T['key in string'] | |
} | |
/** |
OlderNewer