Skip to content

Instantly share code, notes, and snippets.

View donfreiday's full-sized avatar

Donald Freiday donfreiday

View GitHub Profile
@donfreiday
donfreiday / .vimrc
Created February 14, 2024 15:16
.vimrc
"Install plugin management via vim-plug if not already installed
"https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" PLUGINS
@donfreiday
donfreiday / .ideavimrc
Created February 14, 2024 14:53
.ideavimrc
# enable plugins
set surround
set exchange
set nerdtree
set highlightedyank
# yank to the system clipboard
set clipboard^=unnamedplus
set clipboard^=ideaput
@donfreiday
donfreiday / .bashrc
Created February 14, 2024 14:03
.bashrc
shopt -s checkwinsize # check the window size after each command and, if necessary, update the values of LINES and COLUMNS.
shopt -s cdspell # Correct typos when changing directory
# -R: show ANSI colors correctly; -i: case insensitive search
export LESS="-R -i"
# Color for manpages in less makes manpages a little easier to read
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
@donfreiday
donfreiday / AdbCommands
Created June 14, 2023 13:41 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@donfreiday
donfreiday / install_yay.sh
Created July 9, 2021 11:03
Shell script to install yay on Arch Linux
#!/bin/bash
sudo pacman -Syu
mkdir /tmp/yay
cd /tmp/yay
curl -OJ 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yay'
makepkg -si
cd
rm -rf /tmp/yay
yay --version
// Attach to camera to have it follow a GameObject in Unity 2d
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowCharacter : MonoBehaviour
{
public float interpolationSpeed = 0.5f;
public float verticalOffset = 4.0f;
@donfreiday
donfreiday / CameraController.cs
Created February 4, 2020 15:40
gamedev class snippets 001
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour
{
public float interpSpeed = 0.5f;
public GameObject focus;
private Vector3 targetPosition;
// Start is called before the first frame update
@donfreiday
donfreiday / client.c
Created January 30, 2020 21:54
esu networking class example
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <unistd.h>
void error(char *msg) {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Documents;
using System.Xml;
namespace xml1
{
@donfreiday
donfreiday / ubuntu-code
Created October 23, 2019 14:34
Install NodeJS and VS Code on Ubuntu 18.04
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install -y nodejs
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"​
sudo apt update
sudo apt install code