Skip to content

Instantly share code, notes, and snippets.

View Evgenus's full-sized avatar
🇺🇦
Ukraine

Eugene Chernyshov Evgenus

🇺🇦
Ukraine
View GitHub Profile
describe 'Building module with unknown dependency', ->
base = ->
before ->
@old_cwd = process.cwd()
process.chdir("/")
it 'should report unresolved dependency', ->
builder = spa.Builder.from_config("/testimonial/spa.yaml")
Connected!
["auth", [], {"id": "USER-04ce8c53b6144bcc8f57d982b0496f4b"}]
>["nodeCreated", ["XXX"], {"rev": 0}]
["createNode", ["XXX"], {"rev": 0, "origin": 0}]
["changePorts", ["XXX", []], {"rev": 1}]
["changeState", ["XXX", {"__type__": "Root", "path": null}], {"rev": 2}]
>["nodeStateChanged", ["XXX", {"path": "."}], {"rev": 1}]
["createNode", ["NODE-6f00f8c1ff804b80a72cd247c49e449a"], {"rev": 3}]
["changeState", ["NODE-6f00f8c1ff804b80a72cd247c49e449a", {"__type__": "File", "path": ".\\client_vanilla.html"}], {"rev": 4}]
["changePorts", ["NODE-6f00f8c1ff804b80a72cd247c49e449a", [{"name": "in", "title": ""}]], {"rev": 5}]
@Evgenus
Evgenus / gist:11125030
Last active August 29, 2015 14:00
simple js jail
<!DOCTYPE html>
<html>
<head>
<script id="user-code" type="text">
debugger;
</script>
<script type="text/javascript">
(function() {
@Evgenus
Evgenus / gist:6579434
Created September 16, 2013 11:23
Multi part upload with asynko
public static IEnumerable<IAsync> Upload(string version, string config, byte[] content, byte[] thumbnail = null)
{
var multiPart = new MultiPartForm();
multiPart.AddData("config", config);
multiPart.AddFile("content", "application/octet-stream", content);
if (thumbnail != null)
multiPart.AddFile("thumbnail", "image/png", thumbnail);
var url = MakeUrl("upload", version);
var request = CreatePOSTRequest(url).Call<HttpWebRequest>();
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using UnityEngine;
namespace Asynko
{
#region Interfaces
2659119772153226779682489404387918594905342200269924300660432789497073559873882909121342292906175583032440682826506723425601635775590279389642612611093020398930347774460613894425379600874662147884229022133853819192905427915750759274952935109319020362271989830578539328807633196834507090639946131138999460277671978289412532212329252032960511820487913640083895490443657920956267126291922289224609441034849578266461219690879675039920051391388174525259443193865041630348000323295729231692725808120388628956451330203199414186213654593812478970390749485268614971964248428562782648720818548493937299025693132719165544060431069136029010640558959534212123746079660766983306735060532482925553082121188696097199078085563246046013216102655431476452400396602364732664246252767374593256582134654265209220042370143240456646479703878634028476799516301302320589620637994623895999962376530625874148998609130106933187937209476887496871311072138713943694894357288061061557708461902289692063089736008186036231141171109877425423962410946849388972
@Evgenus
Evgenus / gist:2950503
Created June 18, 2012 20:25
YAML Schema Draft #2
!Schema
Schema: !Mapping
patterns: !PatternsList
- !PatternPair
key: Identifier
value: Rule
Rule: !Mapping
fields: !FieldsMap
@Evgenus
Evgenus / gist:2930848
Created June 14, 2012 14:57
YAML Schema Draft #1
Field: !Mapping
fields:
type: # <--- that is name
type:
- string
- TypesList
optional: False # some explicid definition
optional:
type: boolean
optional: True
float-field-1: 1.0
float-field-2: float > 1
a-list:
1
int > 2
float > 3
string > 4
" some string with spaces "
raw string line with any characters will be stripper during parsing