Skip to content

Instantly share code, notes, and snippets.

Avatar
🧠
I may be slow to respond.

Edik Bulikyan lnked

🧠
I may be slow to respond.
View GitHub Profile
View shortcuts
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+cmd+d",
"command": "-workbench.view.debug"
},
{
"key": "shift+cmd+d",
"command": "editor.action.duplicateSelection"
},
View vscode
{
"update.showReleaseNotes": false,
"editor.fontSize": 13,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.hover.enabled": true,
"editor.formatOnPaste": false,
"editor.detectIndentation": true,
"editor.selectionHighlight": true,
View url-schemes-settings-ios.mkd

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
View animation.scss
.is-animated,
.is-parallaxed {
transition: 1s opacity cubic-bezier(.25,.46,.45,.94), 1s transform cubic-bezier(.25,.46,.45,.94);
& + & {
transition-delay: .1s;
}
& + & + & {
transition-delay: .2s;
@lnked
lnked / sec2time.js
Created Nov 28, 2019 — forked from vankasteelj/sec2time.js
Javascript - Seconds to Time (hh:mm:ss,ms) -> sec2time(593.685038) becomes 00:09:53,685
View sec2time.js
function sec2time(timeInSeconds) {
var pad = function(num, size) { return ('000' + num).slice(size * -1); },
time = parseFloat(timeInSeconds).toFixed(3),
hours = Math.floor(time / 60 / 60),
minutes = Math.floor(time / 60) % 60,
seconds = Math.floor(time - minutes * 60),
milliseconds = time.slice(-3);
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3);
}
@lnked
lnked / fix-homebrew-npm.md
Created Jul 25, 2019 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew
View fix-homebrew-npm.md

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@lnked
lnked / mapOrder.js
Created Mar 22, 2019 — forked from ecarter/mapOrder.js
Order an array of objects based on another array order
View mapOrder.js
/**
* Sort array of objects based on another array
*/
function mapOrder (array, order, key) {
array.sort( function (a, b) {
var A = a[key], B = b[key];
@lnked
lnked / Readme.markdown
Created Jan 29, 2019 — forked from mat/Readme.markdown
apple-app-site-association —with examples
View Readme.markdown

“apple-app-site-association” file

One file for each domain, both www.example.com and example.com need separate files:

{
    "applinks": {
        "apps": [],
        "details": {
 "9JA89QQLNQ.com.apple.wwdc": {
@lnked
lnked / 8x1080.md
Created Dec 27, 2018 — forked from epixoip/8x1080.md
8x Nvidia GTX 1080 Hashcat Benchmarks
View 8x1080.md