Skip to content

Instantly share code, notes, and snippets.

kjdev

Block or report user

Report or block kjdev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View db.php
<?php
class db
{
private $_dsn = '';
private $_username = null;
private $_password = null;
private $_pdo = null;
public function __construct($cli)
{
View EchoTask.php
<?php
class echoTask extends \Phalcon\CLI\Task
{
public function mainAction()
{
echo "echoMainAction\n";
}
}
@kjdev
kjdev / phalcon-2.0.0-view-engine-markdown.patch
Last active Aug 29, 2015
Phalcon 2.0.0 patch: Phalcon\Mvc\View\Engine\Markdown
View phalcon-2.0.0-view-engine-markdown.patch
diff --git a/config.json b/config.json
index 8183eec..b5cf118 100644
--- a/config.json
+++ b/config.json
@@ -28,6 +28,16 @@
"phalcon/mvc/model/query/parser.c",
"phalcon/mvc/view/engine/volt/parser.c",
"phalcon/mvc/view/engine/volt/scanner.c",
+ "phalcon/mvc/view/engine/markdown/parser.c",
+ "phalcon/mvc/view/engine/markdown/autolink.c",
View php-pecl-phalcon.spec
%global proj_name cphalcon
%global pecl_name phalcon
%global pecl_version 2.0.1
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
%{?filter_setup}
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
@kjdev
kjdev / phalcon-2.0.1-skip-unittest-yaml.patch
Created May 22, 2015
Phalcon 2.0.1 patch: Skip UnitTest yaml
View phalcon-2.0.1-skip-unittest-yaml.patch
--- a/cphalcon/unit-tests/ConfigTest.php
+++ b/cphalcon/unit-tests/ConfigTest.php
@@ -293,12 +293,22 @@ class ConfigTest extends PHPUnit_Framework_TestCase
public function testYamlConfig()
{
+ if (!extension_loaded('yaml')) {
+ $this->markTestSkipped('Warning: yaml extension is not loaded');
+ return false;
+ }
@kjdev
kjdev / xs-client.c
Created Aug 23, 2012
ZeroMQ and Crossroads I/O
View xs-client.c
/* Crossroad I/O Client */
#include "xs/xs.h"
#include <string.h>
int main(int argc, char **argv)
{
void *ctx = xs_init();
void *backend = xs_socket(ctx, XS_DEALER);
//xs_bind (backend, "ipc://backend");
xs_bind (backend, "tcp://127.0.0.1:5570");
xs_msg_t msg;
@kjdev
kjdev / snapshot.el
Created Oct 4, 2012
snapshot scripts
View snapshot.el
;;; snapshot
(defun snapshot ()
(interactive)
(let ((msg (read-from-minibuffer "comment: ")))
(if (> (length msg) 0)
(shell-command (concat "~/bin/snapshot -m \"" msg "\" " (buffer-file-name)))
(shell-command (concat "~/bin/snapshot " (buffer-file-name))))))
View php-ext-msgpacki.patch
--- a/msgpack.h
+++ b/msgpack.h
@@ -9,103 +9,13 @@
#include <stdint.h>
#endif
-#if HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
@kjdev
kjdev / coveralls.sh
Last active Dec 17, 2015
POST coveralls by gcov
View coveralls.sh
#!/bin/bash
usage()
{
echo "Usage: "${0##*/}" [-s FILES] [-t TOKEN] [-g DIR] [-h] [-v]"
echo ""
echo "Options:"
echo " s: source files"
echo " t: secret repo token for your repository"
echo " g: search gcov/gcda file path"
View libtool_patch.sh
#!/bin/bash
files=(libtool ltmain.sh)
srcdir=`pwd`
IFS=$'\n'
for file in ${files[@]}
do
if [ ! -f ${srcdir}/${file} ]; then
continue
You can’t perform that action at this time.