Skip to content

Instantly share code, notes, and snippets.

View nschonni's full-sized avatar
🛏️
PR'ing from bed

Nick Schonning nschonni

🛏️
PR'ing from bed
View GitHub Profile
@jstangroome
jstangroome / Microsoft.PowerShellISE_profile.ps1
Created August 11, 2010 07:40
Automatic TFS Checkout for PowerShell ISE
if ($global:ProfileEventSubscribers) {
$global:ProfileEventSubscribers |
ForEach-Object {
Unregister-Event -SourceIdentifier $_.Name
}
}
$global:ProfileEventSubscribers = @()
$global:IsTfsInstalled = $false
try {
import UIKit
class ViewController: UIViewController {
var btHelper: BTHelper = BTHelper()
var timer: Timer? = nil
var bgTask = BackgroundTask()
@objc func stop() { btHelper.shutOff() }
@objc func action() { btHelper.startUp() }
@slok
slok / create_github_bitbucket_mirror.md
Created December 8, 2011 11:30
Create github and bitbucket mirror in gitolite

Create Github/Bitbucket Mirror

Create SSH key and configure

Create Key (no passphrase and name mirror the key)

ssh-keygen -t rsa -N "" -f ~/.ssh/mirror

How @extend Works

@akhleung is working on hcatlin/libsass and was wondering how @extend is implemented in the Ruby implementation of Sass. Rather than just tell him, I thought I'd write up a public document about it so anyone who's porting Sass or is just curious about how it works can see.

Note that this explanation is simplified in numerous ways. It's intended to explain the most complex parts of a basic correct @extend transformation, but it leaves out numerous details that will be important if full Sass compatibility

@domenic
domenic / portable-node.md
Created May 25, 2012 21:03
Tips for Writing Portable Node.js Code

Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.

Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.

Paths and URLs

On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation

//
// BTHelper.swift
// Buzz
//
// Created by Erica Sadun on 4/17/18.
// Copyright © 2018 Erica Sadun. All rights reserved.
//
import Foundation
import CoreBluetooth
@Daniel-ltw
Daniel-ltw / from.yaml
Last active August 25, 2023 21:11
Github Actions repository_dispatch example
name: Build Artifacts
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps: