Skip to content

Instantly share code, notes, and snippets.

@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active Jun 19, 2022
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@toolmantim
toolmantim / sidetiq_schedule_time_zone_additions.rb
Last active Nov 30, 2016
An addition to Sidetiq to make it easier to declare the worker's schedule's timezone. Assumes ActiveRecord::TimeZone is available.
View sidetiq_schedule_time_zone_additions.rb
# Timezone extension to Sidetiq
Sidetiq::Schedulable::ClassMethods.class_eval do
# Sets the time zone for the recurrence rules.
#
# Example:
#
# class MyWorker
# include Sidekiq::Worker
# include Sidetiq::Schedulable
#
@pandurang90
pandurang90 / netcat.scpt
Last active Jan 3, 2016
applescript to transfer file using netcat
View netcat.scpt
tell application "SystemUIServer"
set actionSelected to the button returned of (display dialog "What you want to do?" buttons {"Send file", "Receive file"} default button 2)
if actionSelected = "Send file" then
set filepath to POSIX path of (choose file)
display dialog "Please enter IP address of receiver:" default answer ""
set ipAddress to text returned of result
if ipAddress = "" then
repeat
display dialog "IP address cant be blank,Please enter IP address of receiver:" default answer ""