#How to create a .file
or .folder
on Windows
There are several ways
- 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.
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 |
//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; |
var p1 = { | |
x: 20, | |
y: 20 | |
}; | |
var p2 = { | |
x: 40, | |
y: 40 | |
}; |
@mixin pixelated { | |
-ms-interpolation-mode: nearest-neighbor; // IE 7+ (non-standard property) | |
image-rendering: -webkit-optimize-contrast; // Safari 6, UC Browser 9.9 | |
image-rendering: -webkit-crisp-edges; // Safari 7+ | |
image-rendering: -moz-crisp-edges; // Firefox 3.6+ | |
image-rendering: -o-crisp-edges; // Opera 12 | |
image-rendering: pixelated; // Chrome 41+ and Opera 26+ | |
} |
selector { | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; | |
filter: alpha(opacity=30); | |
-moz-opacity: 0.3; | |
-khtml-opacity: 0.3; | |
opacity: 0.3; | |
} |
public boolean isColorDark(int color){ | |
double darkness = 1-(0.299*Color.red(color) + 0.587*Color.green(color) + 0.114*Color.blue(color))/255; | |
if(darkness<0.5){ | |
return false; // It's a light color | |
}else{ | |
return true; // It's a dark color | |
} | |
} |
from: http://www.meandmark.com/keycodes.html | |
Virtual Keycodes for the Mac QWERTY Layout | |
Keycodes are in hexadecimal. A blank entry means either there is no key assigned to that keycode or I was unable to find the assigned key. | |
Keycode Key | |
0x00 A | |
0x01 S | |
0x02 D | |
0x03 F |
///Returns the input value clamped to the lower and upper limits. | |
func clamp<T: Comparable>(value: T, lower: T, upper: T) -> T { | |
return min(max(value, lower), upper) | |
} | |
//----------------------------------------------- | |
// Example usage | |
let proposedIndex = 6 |
Type this into Github Gist Search (https://gist.github.com/)
user:BoQsc your search query