Skip to content

Instantly share code, notes, and snippets.

View sandeepone's full-sized avatar
💭
I may be slow to respond.

Sandeep Sangamreddi sandeepone

💭
I may be slow to respond.
View GitHub Profile
Hey all!
So, We are active users who uses Phalcon/Zephir and we want to see good progress on this.
But due to some problems in the organization process of the community, and not enought time for contirube from main maintainers (@andres ....
Projects are developing quite sluggish and It's awfull.
We would like to create a public vote "Transfer Phalcon and Zephir to Zephir and Phalcon organtizations",
identifying major maintainers and principles "How to development this projects".
Basic things that we are motivated:
<?php
class Pagination {
public static function factory($total, $limit = 5, $page = 1, $adjacents = 2)
{
return new Pagination($total, $limit, $page, $adjacents);
}
public $total;
@nexeck
nexeck / gist:1257411
Created October 2, 2011 12:38 — forked from daGrevis/gist:1257357
Route for mini-CMS
<?php
Route::set('cms', function($uri) {
$is_empty = empty($uri);
$does_exists = class_exists('Controller_' . $uri);
if ($is_empty || $does_exists) {
$default_route = Route::get('default');
@mschubert
mschubert / encfs-rsync.sh
Last active May 4, 2016 04:33
Script to (decrypt encfs and) selectively sync a remote sshfs directory
#!/bin/bash
# Script to (decrypt encfs and) selectively sync a remote sshfs directory
REMOTEDIR=server:/path/to/some/encfs
LOCALDIR=/path/to/local/directory
MOUNTFUNC=_ssh+encfs
# verbose
# set -vx
@kemo
kemo / Cached.php
Created April 27, 2012 21:36
Cache-powered ORM model extension (Kohana 3.3) - [!!] Not tested
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Extend this class if you want your model cached. Example usage:
*
* 1. Model
* class Model_User extends ORM_Cached {}
*
* 2. Usage
*

Goals

Syncthing devices that store data in encrypted format. Such a device can participate fully in a cluster, but the information on the device is not directly usable.

Assumptions and Definitions

  • There exists a secret key per folder, known only by devices that can access the unencrypted data. We call these "secure devices".

  • Devices that do not know the secret key can only access encrypted data. We call these "insecure devices".

@kofemann
kofemann / init-single-node-ceph.sh
Last active October 5, 2020 00:04
Single node CEPH setup
#
# Enable CEPH repos as described at http://ceph.com/docs/master/install/get-packages/#rpm
# Install ceph-deploy package
#
export DATA_DEV=sdb
export JRNL_DEV=sdc
export FS_TYPE=xfs
export CEPH_S_NODE=ceph-s
export CEPH_RELEASE=giant
@jambu
jambu / gmail-scrollbars.css
Created March 9, 2012 02:17 — forked from Cifro/gmail-scrollbars.css
New Gmail like scrollbars for webkit browsers
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}
@nictuku
nictuku / sshd.go
Created April 8, 2012 15:43
Go SSH server complete example
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/terminal"
@ebidel
ebidel / handle_file_upload.php
Created April 18, 2012 03:23
Uploading files using xhr.send(FormData) to PHP server
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,