Skip to content

Instantly share code, notes, and snippets.

@planetceres
planetceres / RESET_USB_KERNEL_MODULE.md
Last active May 4, 2024 14:11
Restart/reset USB kernel module in Ubuntu 18.04 without rebooting
@cnlohr
cnlohr / forgot_to_check_out_with_recurse_submodules.md
Last active April 22, 2024 12:13
Git forgot to clone recursively (forgot to check out with recurse submodules)
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@shovon
shovon / increase_swap.sh
Created April 10, 2015 15:18
Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@ishinao
ishinao / validation.php
Created July 15, 2013 06:37
Laravel 4 app/lang/ja/validation.php バリデーションメッセージ日本語リソース。
<?php
return array(
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
@zoul
zoul / Sound.h
Created October 9, 2009 08:09
Simple wrapper around Audio Services
/*
- Trivial wrapper around system sound as provided by Audio Services.
- Don’t forget to link against the Audio Toolbox framework.
- Assumes ARC support.
*/
@interface Sound : NSObject
// Path is relative to the resources dir.
- (id) initWithPath: (NSString*) path;