Skip to content

Instantly share code, notes, and snippets.

import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())
@csakis
csakis / feathersjs-swagger.js
Created October 1, 2018 19:35 — forked from bravo-kernel/feathersjs-swagger.js
Working example of feathers-swagger with the swagger definition in a service (not in app.js)
// -----------------------------------------------------
// projects.service.js
// -----------------------------------------------------
// Initializes the `projects` service on path `/projects`
const createService = require('feathers-sequelize');
const createModel = require('../../models/projects.model');
const hooks = require('./projects.hooks');
module.exports = function (app) {
const Model = createModel(app);
@csakis
csakis / LICENCE SUBLIME TEXT
Created July 28, 2018 20:08
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@csakis
csakis / splash-spider.py
Created June 6, 2018 16:22 — forked from stummjr/splash-spider.py
Scrapy + Splash example
import scrapy
# this example needs the scrapyjs package: pip install scrapyjs
# it also needs a splash instance running in your env or on Scrapy Cloud (https://github.com/scrapinghub/splash)
class SplashSpider(scrapy.Spider):
name = 'splash-spider'
download_delay = 3
def start_requests(self):
@csakis
csakis / ajax.php
Last active December 23, 2015 13:59 — forked from optikalefx/ajax.php
<?php
require_once("grid.php");
$grid = new Grid("users", array(
"delete"=>true
));
?>
@csakis
csakis / ajax.php
Created September 16, 2013 18:17 — forked from optikalefx/ajax.php
<?php
require_once("grid.php");
$grid = new Grid("users", array(
"delete"=>true
));
?>
<table class="users" action="ajax.php">
<tr>
<th col="Username">Username</th>
<th col="FirstName">First Name</th>
<th col="Lastname">Last Name</th>
<th col="Email">Email</th>
</tr>
</table>