Skip to content

Instantly share code, notes, and snippets.

View rileyrg's full-sized avatar
💭
Emacs can replace PHPStorm

RichieHH rileyrg

💭
Emacs can replace PHPStorm
  • Hamburg, Germany
View GitHub Profile
#!/bin/bash
mountpoint="${1-/media/debianbackup}"
sudo mount "${mountpoint}"
mount | grep "${mountpoint}" >/dev/null
if [ "$?" -eq 0 ]
then
sudo rsync -aAXv /* "${1-"${mountpoint}"}" --exclude={"${HOME}"/.cache,/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,"${mountpoint}",/media/cdrom0,/lost+found} --delete
echo "Unmounting "${mountpoint}""
sudo umount "${mountpoint}"
else
(which-function-mode t)
(add-hook 'after-init-hook 'global-flycheck-mode)
;; (setq flycheck-check-syntax-automatically '(mode-enabled idle-change))
;; (require 'flycheck-color-mode-line)
;; (eval-after-load "flycheck"
;; '(add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode))
(global-set-key (kbd "<f11>") 'next-error)
@rileyrg
rileyrg / upd.sh
Created September 26, 2014 07:47
#!/bin/bash
sudo apt-get update --yes && sudo apt-get upgrade --yes && sudo apt-get dist-upgrade --yes && sudo apt-get autoremove --yes
@rileyrg
rileyrg / upd.sh
Created September 27, 2014 15:59
#!/bin/bash
sudo apt-get update --yes && sudo apt-get upgrade --yes && sudo apt-get dist-upgrade --yes && sudo apt-get autoremove --yes
(which-function-mode t)
(add-hook 'after-init-hook 'global-flycheck-mode)
;; (setq flycheck-check-syntax-automatically '(mode-enabled idle-change))
;; (require 'flycheck-color-mode-line)
;; (eval-after-load "flycheck"
;; '(add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode))
(global-set-key (kbd "<f11>") 'next-error)
@rileyrg
rileyrg / upd.sh
Created September 27, 2014 16:01
#!/bin/bash
sudo apt-get update --yes && sudo apt-get upgrade --yes && sudo apt-get dist-upgrade --yes && sudo apt-get autoremove --yes
Current directory is /home/rgr/development/learning/c/emacside/
Error: you did not specify -i=mi on GDB's command line!
GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin info@barwebs.com
ServerName www.barwebs.com
DocumentRoot /var/www/barwebs/barwebs.com/
ServerAlias barwebs.com
</VirtualHost>
@rileyrg
rileyrg / gist:288980c813fbcdb5465a
Created October 15, 2014 11:51
added list:fdeletewhenexpired setting defaulted to 1 - if 0 then an event doesnt get deleted upon expiry
diff --git a/lib/php/eventstorage.php b/lib/php/eventstorage.php
index 982fcc9..e8da6b9 100755
--- a/lib/php/eventstorage.php
+++ b/lib/php/eventstorage.php
@@ -49,6 +49,7 @@ function populateEventObject(&$row,$category=null){
$row["eventlink"]=getSetting("ev:eventlink",$category,null);
$row["fbcomments"]=getSetting("ev:fbcomments",$category);
$row["fenabled"]=getSetting("ev:fenabled",$category,"1");
+ $row["fdeletewhenexpired"]=getSetting("list:fdeletewhenexpired",$category,"1");
$row["fenableshare"]=getSetting("ev:fenableshare",$category,false); /* to do */
myStartUpHook = do
setWMName "LG3D" -- Java progs need this a jdk 1.6+
spawnOnce "xcompmgr"
spawnOnce "xscreensaver -no-splash"
spawnOnce "stalonetray"
spawnOnce "feh --bg-fill ${WALLPAPER}"
spawnOnce "sleep 2 && xfce4-power-manager"
spawnOnce "sleep 2 && SpiderOak"
spawnOnce "sleep 2 && dropbox start -i"