Skip to content

Instantly share code, notes, and snippets.

@rbrito
rbrito / gimp-autosave.py
Created December 7, 2018 01:27 — forked from Iunius118/gimp_autosave.py
Auto save plug-in for GIMP [2.8, 2.9]
#!/usr/bin/env python
# Original (by yahvuu): http://www.gimpusers.com/forums/gimp-developer/11718-autosave-plugin
import tempfile, os
from time import *
from gimpfu import *
def autosave(image, layer):
backupInterval = 10 * 60
@vluzrmos
vluzrmos / paginate.php
Created July 20, 2016 14:31
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@Pulimet
Pulimet / AdbCommands
Last active March 28, 2024 12:47
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
@chranderson
chranderson / nvmCommands.js
Last active March 28, 2024 12:46
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@gilrrei
gilrrei / writing_utils.tex
Created March 15, 2024 10:13
Utils for paper writing
% Some utils for paper writing
% Just add this file to your project folder and \input{writing_utils} in the main tex file
\usepackage{color}
\usepackage{background}
% During writing
\newcommand{\todo}[1]{{\color{orange} #1}}
\newcommand{\unsure}[2]{{\color{magenta} #1 }{\color{gray} #2}} % check information, move it, etc.
\newcommand{\highlight}[1]{\textbf{#1}} % Highlight important phrases, check if they are prominent enough
@Eskuero
Eskuero / minecraft
Created March 16, 2020 12:43
OpenRC minecraft startup config to run as unprivileged user
#!/sbin/openrc-run
description="Start minecraft server"
command_user="minecraft:minecraft"
command="/usr/bin/java"
command_args="-Xmx1024M -Xms1024M -jar server.jar nogui"
pidfile=mine.pid
command_background=true
directory="/home/minecraft"
@averagesecurityguy
averagesecurityguy / launch_url.txt
Last active March 28, 2024 12:39
"Malicious" PDF
%PDF-1.0
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/Names 6 0 R
>>
endobj
@dotStart
dotStart / MinecraftService.md
Last active March 28, 2024 12:39
Systemd services for Minecraft Servers

Minecraft systemd Services

This gist contains service descriptors which may be used to automatically start and re-start Minecraft servers using systemd. This allows proper control of your server startup on modern Linux distributions and will automatically manage all required tasks on startup for you.

Requirements

@t-mat
t-mat / 00cpuid.md
Last active March 28, 2024 12:39
CPUIDを使ってCPUの情報を取得する
  • Pentium 以降の世代の CPU なら問題なく実行できる
  • VC++ (2005 以降?) なら <intrin.h>#include して、__cpuid() および __cpuidex() を使用する
  • gcc なら <cpuid.h>#include して、__get_cpuid(), __cpuid_count() を使用する
  • RDRAND を使ってみたかったのだけど、うちのは対応していなかった!
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active March 28, 2024 12:38
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example