Skip to content

Instantly share code, notes, and snippets.

View thinkverse's full-sized avatar
🦖

Kim Hallberg thinkverse

🦖
View GitHub Profile
@thinkverse
thinkverse / keybase.md
Created March 21, 2018 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am thinkverse on github.
  • I am thinkverse (https://keybase.io/thinkverse) on keybase.
  • I have a public key ASDYjyxHjho5N9KresNOIHd6zVWSf56OomBq3Rg3L8nH7wo

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 16wxM2vbiFaVjx5j76rNwpiZyFX3Qd631k https://explorer.blockstack.org/address/16wxM2vbiFaVjx5j76rNwpiZyFX3Qd631k
Verifying my Blockstack ID is secured with the address 1J8XgY6oejvNDgLP8vQKzVY1M1Dib8SUPS https://explorer.blockstack.org/address/1J8XgY6oejvNDgLP8vQKzVY1M1Dib8SUPS
@thinkverse
thinkverse / git-tag-delete-local-and-remote.sh
Created January 7, 2020 11:55 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@thinkverse
thinkverse / PotionCommand.java
Last active February 4, 2020 14:54
Spawn SplashPotion on Player
public final class PotionCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
final Player PLAYER = ((Player) sender).getPlayer();
final World WORLD = PLAYER.getWorld();
// Give player the Splash Potion.
// PLAYER.getInventory().addItem(makeSplashPotionItemStack(PotionType.INSTANT_HEAL, false, true));
@thinkverse
thinkverse / TabComplete.java
Created March 14, 2020 16:22
Tab Complete
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
return (args.length == 1) ? Bukkit.getServer().getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()) : Collections.emptyList();
}
@thinkverse
thinkverse / git-understanding-qs.md
Created September 6, 2020 19:02 — forked from githubteacher/git-understanding-qs.md
Questions to check your understanding of some Git and GitHub concepts.

Beginner: Check for understanding

  1. (multiple answer) Git is:

    • a. A version control system
    • b. Centralized
    • c. Distributed
    • d. The same as GitHub
  2. (T/F) Git and GitHub are the same thing.

@thinkverse
thinkverse / ProductController.php
Created December 2, 2020 06:34
laravel-die-dump
class ProductController extends Controller
{
public function show(Request $request, string $product)
{
dd($product, $request);
}
}
@thinkverse
thinkverse / generatePasswords.php
Created January 19, 2021 10:14
Useful snippet for generating quick random passwords
<?php
$keyspace = '123456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
$keyspaceLength = mb_strlen($keyspace, 'utf-8') - 1;
$numberOfPasswords = 8;
$numberOfChars = 16;
$passwords = [];