Skip to content

Instantly share code, notes, and snippets.

Kris Rott intfrr

Block or report user

Report or block intfrr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ce5c4d2003cf6b2f608d56065bcc63b7
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import java.util.Properties;
import java.util.Timer;
import java.util.TimerTask;
@intfrr
intfrr / multiple_ssh_setting.md
Created Jan 12, 2020 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@intfrr
intfrr / delete_git_submodule.md
Created Jan 12, 2020 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@intfrr
intfrr / config
Created Jan 12, 2020 — forked from hfvaldesg/config
i3 config | ~/.i3/config
View config
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
@intfrr
intfrr / convert_repo.sh
Created Jan 2, 2020 — forked from iserko/convert_repo.sh
Shell script for easily joining multiple GIT repositories into a single repository by rewriting the GIT history
View convert_repo.sh
#!/bin/bash
###########
# ./convert_repo.sh
# Author: Igor Serko <igor.serko@gmail.com>
# Description: Allows the user to join multiple git repositories under one single repository
# Procedure: Using git filter-branch we rewrite the history of every repo
# example of current tree
# -- REPOONE
# |-- repoone files
# -- REPOTWO
@intfrr
intfrr / centos-certbot.md
Created Dec 4, 2019 — forked from jdeathe/centos-certbot.md
Installation and Usage of Certbot on CentOS to obtain a Let’s Encrypt TLS/SSL certificate.
View centos-certbot.md

Installation and Usage of Certbot on CentOS

Installation

Install certbot-auto

# mkdir -p /opt/{bin,certbot/bin} \
  && curl -sS \
    -o /opt/certbot/bin/certbot-auto \
@intfrr
intfrr / byzanz-record-window.sh
Last active Jul 15, 2019 — forked from nihal111/byzanz-record-window.sh
A script to ease usage of byzanz, a tool for recording GIFs in Linux.
View byzanz-record-window.sh
#!/bin/bash
# AUTHOR: (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc)
# NAME: GIFRecord 0.1
# DESCRIPTION: A script to record GIF screencasts.
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd)
# Byzanz Gif Maker
#
# Byzanz is an awesome tool for recording GIFs on Linux. It is light and gives an output directly to a gif file. The colors go off often, but the small file size makes up for it.
@intfrr
intfrr / apple1-rom.txt
Created Sep 12, 2018 — forked from robey/apple1-rom.txt
apple 1 ROM disassembly
View apple1-rom.txt
;
; the "monitor ROM" of an apple 1 fit in one page (256 bytes).
;
; this is my attempt to take the disassembled code, give names to the
; variables and routines, and try to document how it worked.
;
;
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a
; peripheral chip that drove the keyboard and video. the video was run by a
; side processor that could treat the display as an append-only terminal that
@intfrr
intfrr / CustomResponseEntityExceptionHandler.java
Created Jul 31, 2018 — forked from matsev/CustomResponseEntityExceptionHandler.java
Generic response error handling using @ControllerAdvice
View CustomResponseEntityExceptionHandler.java
@ControllerAdvice
public class CustomResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
@Override
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) {
List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors();
List<ObjectError> globalErrors = ex.getBindingResult().getGlobalErrors();
List<String> errors = new ArrayList<>(fieldErrors.size() + globalErrors.size());
String error;
for (FieldError fieldError : fieldErrors) {
@intfrr
intfrr / ST2 Cycle Tabbing
Created Jul 5, 2018 — forked from jmnwong/ST2 Cycle Tabbing
Makes CTRL-Tab cycle tabs in order for Sublime Text.
View ST2 Cycle Tabbing
Put in (Preferences -> Key Bindings - User):
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
You can’t perform that action at this time.