Skip to content

Instantly share code, notes, and snippets.

View decebal's full-sized avatar
🥑

Decebal Dobrica decebal

🥑
View GitHub Profile
@decebal
decebal / grpc_asyncio.py
Created February 15, 2018 13:01 — forked from mmellison/grpc_asyncio.py
gRPC Servicer with Asyncio (Python 3.6+)
import asyncio
from concurrent import futures
import functools
import inspect
import threading
from grpc import _server
def _loop_mgr(loop: asyncio.AbstractEventLoop):
@decebal
decebal / http_get.go
Last active April 13, 2016 13:46 — forked from ijt/http_get.go
Example of using http.Get in go (golang)
package main
import (
"fmt"
"http"
"io/ioutil"
"os"
)
func main() {
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
# --------------------------------------------
# General
# --------------------------------------------
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments.
set :application, "domain.com" # Application name
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ...
# --------------------------------------------
# Server
# --------------------------------------------
@decebal
decebal / gist:2870495
Created June 4, 2012 19:58 — forked from irobinson/gist:1990828
User File Manager Knockout View
<div id="dnnUserFileManager" class="dnnFileManager dnnClear">
<div class="fm-explorer-wrap dnnLeft">
<div class="fm-breadcrumb">
<p>
<span data-bind="foreach: currentBreadcrumbs">
<!-- ko if: id === $root.chosenFolderId() -->
<span data-bind="text: name"></span>
<!-- /ko -->
<!-- ko if: id !== $root.chosenFolderId() -->
<a href="#" data-bind="text: name, click: $root.goToFolder"></a> /