Skip to content

Instantly share code, notes, and snippets.

@johntelforduk
johntelforduk / minecraft-bedrock-on-aws.md
Last active January 14, 2024 13:16
How to install a Minecraft Bedrock Server on AWS

How to install a Minecraft Bedrock Server on AWS

Server software download

Download the .zip from Minecraft website.

Expand the zip and put contents into a code S3 bucket.

Security Group

@abelcallejo
abelcallejo / README.md
Last active July 14, 2024 06:44
Creating bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@seivan
seivan / filter.swift
Created January 16, 2016 01:21
Sample CIFilter with Swift.
@objc class JPTiltShiftGenerator: NSObject, CIFilterConstructor {
@objc func filterWithName(name: String)->CIFilter? {
return JPTiltShift()
}
}
class JPTiltShift : CIFilter {
class func register() {
@wassname
wassname / scrape_Wikipedia_tables.py
Last active October 25, 2023 08:28
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for each table
# -*- coding: utf-8 -*-
"""
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for
each table
url: https://gist.github.com/wassname/5b10774dfcd61cdd3f28
authors: panford, wassname, muzzled, Yossi
license: MIT
"""
from bs4 import BeautifulSoup
@omgwtfgames
omgwtfgames / A set of Unity3D extension methods
Last active March 2, 2024 17:44
Some useful extension method for Unity3D
A collection of useful C# extension methods for the Unity engine.
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active July 9, 2024 15:53
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@chrismccoy
chrismccoy / gitcheats.txt
Last active July 16, 2024 11:44
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# count total commits in a repo
git rev-list --all --count
# edit all commit messages
git rebase -i --root
@afgomez
afgomez / dmginstall.sh
Created November 29, 2012 22:29
Download and install a .dmg
#!/bin/bash
# Downloads and install a .dmg from a URL
#
# Usage
# $ dmginstall [url]
#
# For example, for installing alfred.app
# $ dmginstall http://cachefly.alfredapp.com/alfred_1.3.1_261.dmg
#
@trodrigues
trodrigues / gist:1023167
Created June 13, 2011 16:51
Checkout only certain branches with git-svn
If you want to clone an svn repository with git-svn but don't want it to push all the existing branches, here's what you should do.
* Clone with git-svn using the -T parameter to define your trunk path inside the svnrepo, at the same time instructing it to clone only the trunk:
git svn clone -T trunk http://example.com/PROJECT
* If instead of cloning trunk you just want to clone a certain branch, do the same thing but change the path given to -T:
git svn clone -T branches/somefeature http://example.com/PROJECT