Skip to content

Instantly share code, notes, and snippets.

Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.
Though wise men at their end know dark is right,
Because their words had forked no lightning they
Do not go gentle into that good night.
Good men, the last wave by, crying how bright
@dominicusin
dominicusin / test.ps1
Created November 2, 2015 07:38
Winda
Get-Command -Module PackageManagement
Get-PackageProvider –Name Chocolatey –ForceBootstrap
Set-Executionpolicy Unrestricted –Scope CurrentUser
Register-PackageSource -Name chocolatey -ProviderName Chocolatey -Location http://chocolatey.org/api/v2/
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('[[[[http://repo.pbox.me/files/i.ps1')]]]])" && set PATH=%PATH%;%ALLUSERSPROFILE%\pbox
nuget install chocolatey -pre
@dominicusin
dominicusin / fedora25.sh
Last active December 30, 2016 16:26
fedora25-postinstall.sh
#!/bin/bash
echo "#!/bin/bash"
#♩ ♪ ♫ ♬"
for r in alexhaydock/fedpo baoboa/hwinfo decathorpe/syncthing \
petersen/stack rommon/telegram davidva/firefox-nightly;
do echo dnf copr enable -y $r;done

Keybase proof

I hereby claim:

  • I am dominicusin on github.
  • I am dominicusin (https://keybase.io/dominicusin) on keybase.
  • I have a public key ASBXdZNSyZ8E2wnNy75liQlYol2IoF-KYofUz1KW6PCFYQo

To claim this, I am signing this object:

@dominicusin
dominicusin / zend-tutorial-1.html
Created April 13, 2017 20:01 — forked from dreikanter/zend-tutorial-1.html
Хабрапост 2007 года про Zend Framework — http://habrahabr.ru/post/31168/, http://habrahabr.ru/post/31173/
<b>Update (2014):</b> Это статья 2007 года, которая, к моему удивлению, до сих пор пользуется спросом. По этой причине я обновил её в соответствии с новыми правилами оформления постов на Хабре, и добавил подсветку синтаксиса для примеров кода. Если кому-то захочется что-то добавить или исправить, исходник текста с хабра-разметкой выложен в открытый доступ: https://gist.github.com/dreikanter/2b4ee996d7a775e707d7
<h4>Аннотация от переводчика</h4>
PHP — один из самых широко распространенных языков разработки веб-приложений и при этом один из самых спорных. Я очень часто видел негативное отношение к этой технологии, да и недостатки, провоцирующие это отношение — не для кого не являются секретом. Тем не менее, PHP активно эволюционирует и во многих отношениях постепенно становитс лучше. Одним из серьезных шагов его развития, на мой взгляд, является появление MVC-фреймворков, призванных систематизировать процесс разработки веб-приложений и приучить к порядку разработчиков, которым зачастую здорово не хватает силы
@dominicusin
dominicusin / btrfs
Last active September 25, 2017 22:30
btrfs optimisation
for filesystem in $(mount -t btrfs | awk '{print $3}' )
do
mount -o remount,clear_cache $filesystem
btrfs balance start -v -f --full-balance -dconvert=single,usage=99 -mconvert=single,usage=99 -sconvert=single,usage=99 $filesystem
btrfs filesystem defragment -v -r -czlib -f $filesystem
btrfs scrub start -BdRf $filesystem
done
@dominicusin
dominicusin / deb
Last active July 1, 2017 12:47
copy deb installs with settings on other loc
#!/bin/sh
debootstrap --verbose --arch=amd64 --components=main,contrib,non-free --include="`echo "$(dpkg-query -Wf '${Package},')mc"`" sid talis http://vwakviie2ienjx6t.onion/debian/
apt-get install dselect debconf-utils
mkdir system-selections
cd system-selections
dpkg-query -Wf '${Package}\n' >Packages.lst;
dpkg --get-selections '*' > dpkg-selections;
update-alternatives --get-selections > alternatives
debconf-get-selections > debconf;
@dominicusin
dominicusin / LEDE
Last active July 1, 2017 12:46
install router soft at once
opkg update
opkg -t /overlay/tmp/ --force-postinstall --force-space --force-overwrite --force-maintainer install `opkg list|cut -d' ' -f1`
for p in `opkg list|cut -d' ' -f1`;do opkg -t /overlay/tmp/ --force-postinstall --force-space --force-overwrite --force-maintainer install $p;done
### Keybase proof
I hereby claim:
* I am dominicusin on github.
* I am dominicusin (https://keybase.io/dominicusin) on keybase.
* I have a public key whose fingerprint is 8BD8 F88C 8A23 4092 53AE 4D64 4F3A D112 49FF A920
To claim this, I am signing this object:
@dominicusin
dominicusin / go.sh
Last active July 18, 2017 23:48
mips chroot
mount -R /proc /chroot/mips/proc;mount -R /sys /chroot/mips/sys;mount -R /dev /chroot/mips/dev
mount -t overlay -o rw,noatime,lowerdir=/chroot/mips/,upperdir=/chroot/mips/overlay/upper,workdir=/chroot/mips/overlay/work /chroot/mips/overlay/ /chroot/mips/
env -i /sbin/chroot /chroot/mips /bin/ash
umount -l `mount |grep mips|cut -d' ' -f3`