Skip to content

Instantly share code, notes, and snippets.

Shilo Shilo

Block or report user

Report or block Shilo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Shilo
Shilo / angle-between-points.js
Created Sep 4, 2018 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
View angle-between-points.js
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@Shilo
Shilo / gist:b3f581ef937dfc22466ca579176492d2
Created Jan 4, 2018 — forked from ozh/gist:4131243
Create dot files/directories (ie .file) on Windows
View gist:b3f581ef937dfc22466ca579176492d2

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

@Shilo
Shilo / spoilerAlert.plugin.js
Last active Dec 18, 2017 — forked from NanoAi/spoilerAlert.plugin.js
spoilerAlert.plugin.js
View spoilerAlert.plugin.js
//META{"name":"spoilerAlert"}*//
/*@cc_on
@if (@_jscript)
// _jscrupt stolen (not really) from noodlebox#0155!
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
@Shilo
Shilo / file-size.pipe.ts
Created Nov 2, 2016 — forked from JonCatmull/file-size.pipe.ts
Angular2 + TypeScript file size Pipe/Filter. Convert bytes into largest possible unit. e.g. 1024 => 1 KB
View file-size.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
/*
* Convert bytes into largest possible unit.
* Takes an precision argument that defaults to 2.
* Usage:
* bytes | fileSize:precision
* Example:
* {{ 1024 | fileSize}}
* formats to: 1 KB
@Shilo
Shilo / gist:76f8428d010916b50a4461418cba33cb
Created Aug 6, 2016 — forked from qiaoxueshi/gist:5918651
Disable warning "PerformSelector may cause a leak because its selector is unknown"
View gist:76f8428d010916b50a4461418cba33cb
//disable warning:"PerformSelector may cause a leak because its selector is unknown"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self.delegate performSelector:self.selector];
#pragma clang diagnostic pop
@Shilo
Shilo / .gitignore
Created May 28, 2016 — forked from Shogan/.gitignore
Unity3D .gitignore for team collaboration
View .gitignore
# Unity generated and a few customs #
# ================================= #
Temp/*
Library/*
Build/*
Obj/*
WebBuild/*
WindowsBuild/*
# ===================================== #
View gist:e470c28b24127f78795f
create dummy images
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png
get page headers
curl --head http://google.com
send parameters to page
curl.exe -L -G "http://yoururl.com" --data-urlencode "text=DESIGN6 daily backup started"
send formdata & files to page
View Unity Right Click Open Folder.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\Unity5]
@=""
"Icon"="%ProgramFiles%\\Unity\\Editor\\Unity.exe"
"MUIVerb"="Open as Unity Project"
[HKEY_CLASSES_ROOT\Folder\shell\Unity5\Command]
@="cmd /c start /D\"c:\\Program Files\\Unity\\Editor\\\" Unity.exe -projectPath \"%1\""
View color.m
/*
Distributed under The MIT License:
http://opensource.org/licenses/mit-license.php
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
You can’t perform that action at this time.