Skip to content

Instantly share code, notes, and snippets.

View Pysis868's full-sized avatar
💭
everything at once

Pysis Pysis868

💭
everything at once
View GitHub Profile
@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv
@yeahunter
yeahunter / grub.cfg
Created May 24, 2014 18:59
usb-re grubnak
set timeout=10
set default=0
menuentry "Ubuntu 14.04 server x64" {
loopback loop /ubuntu.iso
linux (loop)/install/vmlinuz file=/cdrom/preseed/ubuntu-server.seed quiet --
initrd (loop)/install/initrd.gz
}
## Teszt szekció
@brenopolanski
brenopolanski / merge-pdf-ghostscript.md
Last active May 2, 2024 06:56
Merge multiple PDFs using Ghostscript

A simple Ghostscript command to merge two PDFs in a single file is shown below:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Install Ghostscript:

Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.

@samdoran
samdoran / grub.cfg
Created July 31, 2014 05:06
Grub 2 USB Drive
# Original grub.cfg and instructions from Lance at Pendrivelinux
# http://www.pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux/
#set timeout=0
set default=0
set isopath="/iso"
menuentry "Ubuntu 12 64-bit" {
set isofile="$isopath/ubuntu-12.iso"
set gfxpayload=keep
@noisufnoc
noisufnoc / grub.cfg
Last active August 29, 2015 14:08
usb stick grub
# Config for GNU GRand Unified Bootloader (GRUB)
# /boot/grub/grub.cfg
# Timeout for menu
set timeout=30
# Default boot entry
set default=0
# Menu Colours
@subfuzion
subfuzion / global-gitignore.md
Last active May 5, 2024 19:34
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@timlinux
timlinux / gist:3bbabf96779906d746ff
Last active January 21, 2020 17:14
Setup procedure for a new Fedora workstation
#!/bin/bash
##########################################################
# Updated 3 July 2015 to use dnf and tweaks for Fedora 22
##########################################################
# Change below to whichever host is running apt cacher
# setup apt-cacher - do this after lxc docker as ssl sources are not configured for cacher by me
dnf install -y apt-cacher-ng
systemctl start apt-cacher-ng.service
@leommoore
leommoore / file_magic_numbers.md
Last active May 17, 2024 18:26
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files

@jamiekurtz
jamiekurtz / grub.cfg
Last active June 8, 2023 00:24
Grub config for creating my own bootable USB stick
# This grub.cfg file was created by Jamie Kurtz
# Detailed instructions for use will soon be found here: http://www.jamiekurtz.com
# Simplified instructions below
# Sample grub entries... https://wiki.archlinux.org/index.php/Multiboot_USB_drive
# Inspiration from here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/
# Simplified instructions...
# Make sure grub, grub-efi, and xorriso packages are installed and up-to-date
# In your terminal go to directory where want to create the USB image contents
# Run the following to create the necessary folder structure:
@carcinocron
carcinocron / debugger pause beforeunload
Last active April 25, 2024 16:48
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)