Skip to content

Instantly share code, notes, and snippets.

View df-a's full-sized avatar
🎯
Focusing

df-a

🎯
Focusing
View GitHub Profile
@df-a
df-a / df-icon.svg
Created January 20, 2017 07:55
df logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@df-a
df-a / Parallel_Tools_fix_for_Ubuntu_19.04.md
Created April 23, 2020 17:34 — forked from mag911/Parallel_Tools_fix_for_Ubuntu_19.04.md
Parallel Tools fix for Ubuntu 20.04, 19.04, 19.10, 18.04

First off, credit goes to github.com/rudolfratusinski for leading the way here.

https://gist.github.com/rudolfratusinski/a4d9e3caff11a4d9d81d2e84abc9afbf

In a very similar approach, copy the files from the Parallels installation media and drop them in a folder somewhere (eg. ~/parallels_fixed)

Go to the kmods directory (cd ~/parallels_fixed/kmods) and extract the files (tar -xzf prl_mod.tar.gz)

Remove prl_mod.tar.gz file from that directory (rm prl_mod.tar.gz)

@df-a
df-a / file-comment.php
Last active April 29, 2020 03:36
File comment and php doc comment block example
/**
* Short description for file.
*
* Long description for file (if any)...
*
* PHP version 7
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
@df-a
df-a / Install.md
Created May 3, 2020 10:39 — forked from zhiephie/Install.md
Installing nginx, php7-fpm with opcache, memcached, phpredis and xdebug extension on Centos 7

run ./setup.sh

Install Nginx

# yum repository  
$ vim /etc/yum.repos.d/nginx.repo
  [nginx]
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/7/$basearch/
 gpgcheck=0
@df-a
df-a / sync-forked-repo.md
Created October 4, 2020 07:06 — forked from corinneling/sync-forked-repo.md
How to sync up a forked repository

How to Sync A Forked Repo

One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).

  1. Make sure you are in the right place
    • That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.

      fatal: refusing to merge unrelated histories

    • That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error

  • An easy way to check where you are is the command:
@df-a
df-a / .gitignore
Last active October 5, 2020 11:48 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Codekit #
@df-a
df-a / advancedsettings.xml
Last active November 2, 2020 20:20
Kodi for Xbox One Setup and Configuration (Working on Leia)
<!-- This goes in the profile directory. If you need to find out where it is, install the "indigo" addon and then check the logs -->
<advancedsettings version="1.0">
<video>
<excludefromscan>
<regexp>[-\._ ](extrafanart|sample|trailer|extrathumbs)[-\._ ]</regexp>
</excludefromscan>
<excludefromlisting>
<regexp>[-._ \\/](extrafanart|sample|trailer|extrathumbs)[-._ \\/]</regexp>
</excludefromlisting>
<!-- Extras: Section Start -->
@df-a
df-a / Fusion.txt
Created March 3, 2021 08:42
Get VMWare Fusion working on MacOS
Using Terminal, get the TeamIdentifier value from the VMWare Fusion version you're using (the % is the prompt, so omit that):
% codesign -dv --verbose=4 /Applications/VMware\ Fusion.app
From the results of that command, find the "TeamIdentifier" value, for example:
TeamIdentifier=EG7KH642X6
Write that down, and note this is case-sensitive.
@df-a
df-a / update.sh
Created March 8, 2021 17:08
Parrot OS ZFS installer script
#!/bin/dash
sudo apt-get install -y git build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-$(uname -r) python3 python3-dev python3-setuptools python3-cffi libffi-dev || return;
sudo rm -r zfs;
git clone --recursive --recurse-submodules --single-branch --branch master https://github.com/openzfs/zfs.git || return;
cd zfs || return;
sh autogen.sh CFLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin -O3" CPPFLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin -O3" C++FLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin -O3" LDFLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin -O3" || return;
./configure --prefix=/ --libdir=/lib --includedir=/usr/include --datarootdir=/usr/share --enable-systemd CFLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin -O3" CPPFLAGS="-m64 -march=native -mtune=native -flto -fuse-linker-plugin