Skip to content

Instantly share code, notes, and snippets.

View AnkushMalik's full-sized avatar
Verified

Ankush Malik AnkushMalik

Verified
  • Jiocinema
  • New Delhi,India
View GitHub Profile
@bruisedsamurai
bruisedsamurai / Boyer-Moore.rs
Last active October 23, 2020 11:58
Boyer-Moore implementation in Rust
/*
Copyright 2020 Subhanshu Goel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@AnkushMalik
AnkushMalik / vagrant_kernel_start.md
Last active January 14, 2018 19:43
vagrant initialization error :- /sbin/rcvboxdrv : command not found

It would not be a matter if we can run this recommended command to recompile VirtualBox kernel modules :

sudo /sbin/rcvboxdrv setup

but it failed, with the msg :

/sbin/rcvboxdrv: command not found

after researching a lot on web, i found a workaround:

sudo /usr/lib/virtualbox/vboxdrv.sh setup

@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active May 28, 2024 17:41
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems: