Skip to content

Instantly share code, notes, and snippets.

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

Andrey askucher

💭
I may be slow to respond.
  • Kiev
View GitHub Profile
@askucher
askucher / request.json
Created August 26, 2015 15:39
request
{
"req": {
"url": "/api/v1/activities?pageSize=100&page=0",
"method": "GET",
"headers": {
"host": "backend-proxy-askucher.c9.io:80",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
"accept-encoding": "gzip, deflate, sdch",
@askucher
askucher / index.html
Created January 16, 2015 20:04
Try livescript
<html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LiveScript - a language which compiles to JavaScript</title>
<meta name="description" content="LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.">
<link rel="canonical" href="http://livescript.net">
<link rel="icon" type="image/png" href="images/icon.png">
<link href="bootstrap/themes/cerulean.bootstrap.min.css" rel="stylesheet">
<link href="google-code-prettify/prettify.css" rel="stylesheet">
@askucher
askucher / example.json
Last active August 29, 2015 14:13
BULK-transfer optimization example
{
"libs": {
"0": {
"1": "Confirmed",
"2": "Unconfirmed",
"3": "Terminated"
},
"1": {
"1": "Exercised",
"2": "Pending",
// Generated by LiveScript 1.3.1
var p, Promise, Parallel, go, toString$ = {}.toString;
p = require('./server-prelude-extension.js');
Promise = (function(){
Promise.displayName = 'Promise';
var prototype = Promise.prototype, constructor = Promise;
function Promise(){
this.callbacks = [];
}
prototype.success = function(result){
@askucher
askucher / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
#
#
#
tree -i -f | grep [.]jade | xargs -L1 jade
tree -i -f | grep [.]ls | xargs -L1 lsc -c -b --no-header
#tree -i -f | grep [.]ls | xargs -L1 lsc --map linked-src
tree -i -f | grep [.]sass | xargs -L1 sass --update
#
#
cd app/components
@askucher
askucher / reset-db.sh
Last active August 29, 2015 14:26
Reset db but keep an user
#!/bin/bash
#DROP DATABASE and RESTORE THE USER
#run it remotely
# curl -s "https://gist.githubusercontent.com/askucher/b33253496f3f40c0b3a5/raw/d23d23fba3d184fb46095f57f3bc3d8952b5d7fd/reset-db.sh" | bash
evals ()
{
@askucher
askucher / html_to_jade
Last active August 29, 2015 14:26
transform concrete folders
#npm install -g nixar jade
jadef ()
{
cd $1
ls | filter html | append "html2jade --donotencode --bodyless *" | bash
cd ..
}
jadef "folder"
@askucher
askucher / 1-linux.md
Created August 25, 2015 11:17
nixar.fs

Операция

$ ls *.*  #=> filename.txt  rootfile.txt  rootfile2.txt
@askucher
askucher / 1-linux.md
Created August 25, 2015 11:17
nixar.uniq

Операция

$ cat filename.txt | uniq -u