Skip to content

Instantly share code, notes, and snippets.

u0d7i

Block or report user

Report or block u0d7i

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@u0d7i
u0d7i / n900_pcsuite_usbnet.txt
Last active Aug 29, 2015
N900 - usbnet and sshd on connect in PC Suite mode
View n900_pcsuite_usbnet.txt
Nokia-N900:~# diff -u /usr/sbin/pcsuite-enable.sh.dist /usr/sbin/pcsuite-enable.sh
--- /usr/sbin/pcsuite-enable.sh.dist 2000-01-01 15:50:20.000000000 +0200
+++ /usr/sbin/pcsuite-enable.sh 2000-01-01 15:54:25.000000000 +0200
@@ -71,4 +71,8 @@
kill -USR1 $SYNCD_PID
logger "$0: sent SIGUSR1 to syncd"
+# mod:
+# enable usbnet and start sshd
+/sbin/ifup usb0
@u0d7i
u0d7i / n900_startup_rdate.txt
Created Jul 29, 2015
N900 - remove startup wizard, set date via NTP
View n900_startup_rdate.txt
Nokia-N900:~# mv /etc/X11/Xsession.d/30osso_startup_wizard /root
Nokia-N900:~# apt-get install openrdate
Nokia-N900:~# rdate -n pool.ntp.org
@u0d7i
u0d7i / all_gists_via_api.txt
Last active Apr 18, 2019
Download all my gists (via API)
View all_gists_via_api.txt
$ wget -q -O - https://api.github.com/users/u0d7i/gists | grep raw_url | awk -F\" '{print $4}' | xargs -n1 wget
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Created Aug 8, 2015
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
View wallabag-pdf-utf8-fix.txt
$ cd $MYWBDIR
$ dpkg -L php-tcpdf | grep fonts
$ cp /usr/share/php/tcpdf/fonts/dejavusans* ./inc/3rdparty/libraries/tcpdf/fonts/
$ cp ./inc/poche/WallabagEBooks.class.php ./inc/poche/WallabagEBooks.class.php.dist
$ vi ./inc/poche/WallabagEBooks.class.php
View preserve_date_in_replace.txt
Preserve file timestamp in multifile string replace
-I to grep ignores binary files,
@ in sed works as separator for strings with /
-r in touch uses existing file timestap as a reference
$ grep -IR aaaa /somepath/ | awk -F: '{print $1}' | while read line; do touch -r $line /tmp/timeref; sed -i 's@aaaa@bbbb@' $line; touch -r /tmp/timeref $line; done
View rdesktop.txt
$ rdesktop -g 90% -r clipboard:CLIPBOARD windowsbox.net.lab
View chromium.desktop-fix.txt
$ sudo sed -i 's@bin/chromium@bin/chromium -incognito@' /usr/share/applications/chromium.desktop
View abuse-prepaid-quota.txt
# while true; do qp g+ && timeout 10 apt-get -y install elinks; qp g-; sleep 1; done
# time while true; do date +"%F %T"; ./3g-connect && echo "ip address: $(ip addr show dev gprs0 | grep inet | awk '{print $2}')"; timeout 5 wget --progress=dot -c http://cdn.kernel.org/pub/linux/kernel/v4.x/testing/linux-4.4-rc8.tar.xz && break; echo; ./3g-disconnect; sleep 1; echo; done
View wget-ignore-robots.txt
$ wget -e robots=off --wait 1 http://your.site.here
You can’t perform that action at this time.