Skip to content

Instantly share code, notes, and snippets.

View Restuta's full-sized avatar
🦄
Hacking fast and slow.

Anton Vynogradenko Restuta

🦄
Hacking fast and slow.
View GitHub Profile
@Restuta
Restuta / StringExtensions.cs
Created August 26, 2010 20:25
Various useful System.String extensions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AutoAssemblyVersion
{
/// <summary>
/// Contains string extensions.
/// </summary>
@Restuta
Restuta / arrow-fu-and-this.js
Created September 8, 2015 19:26
Arrow functions and "this"
function Foo() {
setTimeout(
function() { console.log(this); },
200);
}
function Bar() {
setTimeout(
() => { console.log(this); },
200);
@Restuta
Restuta / Bootstrap Grid Visualized.markdown
Created September 10, 2015 21:49
Bootstrap Grid Visualized
@Restuta
Restuta / CsvFieldsSaver.cs
Created September 22, 2010 22:54
CsvFieldsSaver + Tests
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Restuta;
using System.Text;
namespace Restuta.FieldSavers
{
/// <summary>
while not inFSO.FileExists(pdfFileName1) and not inFSO.FileExists(pdfFileName2)
ExecuteSQL("waitfor DELAY '00:00:02'")
@Restuta
Restuta / slim-redux.js
Created September 24, 2015 02:39 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
Enumerable.Range(0, 1000000)
.AsPrallel()
.Agregate((x, y) => x + y);
@Restuta
Restuta / gist:812753
Created February 5, 2011 20:16
Tanahas first programm =)
<html>
<head>
<Script Language="JavaScript">
//мой скрипт
Lets = new Date();
var mya = Lets.getMonth();
var mya1 = mya + 1
document.write("<font color='green'>Привет. Сегодня " + Lets.getDate() + "/" + mya1 + "/" + Lets.getFullYear() + ". Я написала этот скрипт, потому, что ... так оно и есть!</font>");
@Restuta
Restuta / gist:1772878
Created February 8, 2012 20:03
find a thread safety bug
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class ThreadUnsafe
{
public static int _val1 = 1;
public static int _val2 = 1;
@Restuta
Restuta / PlanB.md
Created February 15, 2012 17:48 — forked from chaliy/PlanB.md
31337 Book

Not in particular order

  1. Perfectionism
  2. Revision Control
  3. Continuous XXX
  4. Async your life
  5. Persistence
  6. Testing
  7. Communitcation
  8. GTD (o_O)