Skip to content

Instantly share code, notes, and snippets.

View wickchucked's full-sized avatar

Ed Winn wickchucked

  • Wick <--> Labs
  • Marshall, MN
View GitHub Profile
@wickchucked
wickchucked / gist:44c25883685f0c6bb30c
Last active September 29, 2017 17:06
Clean up boot partition
http://askubuntu.com/questions/345588/what-is-the-safest-way-to-clean-up-boot-partition
NOTE: this is only if you can't use apt to clean up due to a 100% full /boot
If apt-get isn't functioning because your /boot is at 100%, you'll need to clean out /boot first. This likely has caught a kernel upgrade in a partial install which means apt has pretty much froze up entirely and will keep telling you to run apt-get -f install even though that command keeps failing.
Get the list of kernel images and determine what you can do without. This command will show installed kernels except the currently running one sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`. Note the two newest versions in the list. You don't need to worry about the running one as it isn't listed here. You can check that with uname -r.
Craft a command to delete all files in /boot for kernels that don't matter to you using brace expansion to keep you sane. Remember to exclude the current and two newest kernel imag
@wickchucked
wickchucked / hl.pack.js
Created October 22, 2015 01:45
Bis syntax hightlight.js file
var hljs = new function() {
/* Utility functions */
function escape(value) {
return value.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;');
}
function tag(node) {
return node.nodeName.toLowerCase();
@wickchucked
wickchucked / railscasts.css
Created October 22, 2015 01:44
Theme for syntax highlighting
/*
Railscasts-like style (c) Visoft, Inc. (Damien White)
*/
pre code {
display: block;
padding: 0.5em;
color: #404040;
@wickchucked
wickchucked / .bashrc
Last active October 7, 2015 10:59
Sublime Text 3 shortcut. Git Bash. Windows.
alias subl="/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe"
@wickchucked
wickchucked / bis-hightlight.pack.js
Created September 22, 2015 19:04
BIS/Mapper syntax highlighting file. Including other languages.
var hljs = new function() {
function l(o) {
return o.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;")
}
function b(p) {
for (var o = p.firstChild; o; o = o.nextSibling) {
if (o.nodeName == "CODE") {
return o
}
if (!(o.nodeType == 3 && o.nodeValue.match(/\s+/))) {
@wickchucked
wickchucked / bis-syntax-file.js
Created September 22, 2015 19:02
hightlight.js BIS/Mapper syntax file
/*
Language: BIS
Author: Ed Winn <wickchucked@gmail.com>
*/
hljs.LANGUAGES.bis = function(a) {
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
var TAG_INTERNALS = {
endsWithParent: true,
relevance: 10,
contains: [
@wickchucked
wickchucked / symlink.md
Created August 25, 2015 00:42
Symlink sites nginx
@wickchucked
wickchucked / gist:5bfb0219d488c5ace446
Created October 26, 2014 15:28
MAPPER Get sessionid utility
.@ CSID CSID Desc Find Session ID in State Mgmt
*
*
*===============================================================================
@ rer,ecab$,i,2 0001 rar,ecab$,i,2 0001 . sets-run-error-&-run-abort-rout
@ chg input$ <sessionid>s20 .
@ IF <SESSIONID> EQ '' LDV <RSR>H1='Y' RSR 0120 . ; . ¬BLANK INPUT?
@0110:BRK . |¬CLEAR OUTPUT AREA
FKEY,0,RESUME,KEY
FKEY,1,RESUME,KEY
@wickchucked
wickchucked / Preferences.sublime-settings
Created October 16, 2014 17:00
Sublime User Preferences
{
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/bis-sublime/BISColorScheme.tmTheme",
"copy_with_empty_selection": false,
"default_encoding": "UTF-8",
"dictionary": "Packages/Language - English/en_US.dic",
"draw_white_space": "all",
"endable_tab_scrolling": false,
"file_exclude_patterns":
@wickchucked
wickchucked / ondemand.sql
Created October 10, 2014 19:09
Set on demand to true
UPDATE
public.spree_products
SET
on_demand = true;