Skip to content

Instantly share code, notes, and snippets.

@n1mh
n1mh / changing_user_transmission-daemon.sh
Last active July 8, 2020 20:49
Changing user for transmission-daemon in raspberry pi
#!/bin/bash
sudo /etc/init.d/transmission-daemon stop
sudo chown -R pi:pi /etc/transmission-daemon
sudo rm -rf ~pi/.config/transmission-daemon
sudo mv /etc/transmission-daemon ~pi/.config/
sudo ln -s ~pi/.config/transmission-daemon /etc/transmission-daemon
sudo chown pi:pi /etc/default/transmission-daemon
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active February 20, 2024 09:37 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@NathanWalker
NathanWalker / base.component.ts
Created August 30, 2016 16:04
An Angular 2 custom Component decorator which sets ViewEncapsulation.None to all components that use it.
// angular
import {Component, ViewEncapsulation} from '@angular/core';
declare var Reflect: any;
const _reflect: any = Reflect;
// Usage:
// @BaseComponent({ etc... })
export function BaseComponent(metadata: any = {}) {
@DaveVoyles
DaveVoyles / Modernizr.getusermedia
Created May 29, 2015 15:55
Checking for getuserMedia
if (Modernizr.getusermedia) {
var getUM = Modernizr.prefixed('getUserMedia', navigator);
getUM({video: true}, function( //...
//...
}
@denvazh
denvazh / README.md
Last active March 17, 2023 16:38
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 12:10
  • brew upgrade every day at 12:20

How to install

@benatkin
benatkin / Global.sublime-settings
Created July 20, 2011 04:26
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}