Skip to content

Instantly share code, notes, and snippets.

View carlosal1015's full-sized avatar
πŸ‡΅πŸ‡ͺ
Studying mathematics

Oromion carlosal1015

πŸ‡΅πŸ‡ͺ
Studying mathematics
View GitHub Profile
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@dreamcat4
dreamcat4 / jot_0
Last active June 27, 2021 20:03
Prevent "portsnap fetch" from failing when run non-interactively.
#!/bin/sh
#
# jot_0:
# Print "0" always. Overrides the default behaviour.
# $ "man jot" for more information.
#
echo "0"
@samrocketman
samrocketman / compile_git.md
Last active October 24, 2022 06:03
Compiling git

The version of git that comes with RHEL6 is very old. I'll outline steps for compiling the latest git version on RHEL6. Working from /usr/local/src.

Following instructions for Git Pro book Getting Started Installing Git.

Prerequisites

yum install gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker

Optional man page prereqs.

@gitaarik
gitaarik / git_submodules.md
Last active July 18, 2026 22:56
Git Submodules basic explanation

Git Submodules - Basic Explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@pedrospdc
pedrospdc / gist:8850294
Created February 6, 2014 18:51
IPython config
$ ipython profile create
$ vim ~/.config/ipython/profile_default/ipython_config.py
# Configuration file for ipython.
c = get_config()
#------------------------------------------------------------------------------
# InteractiveShellApp configuration
#------------------------------------------------------------------------------
@CrookedNumber
CrookedNumber / gist:8964442
Created February 12, 2014 21:02
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

@willprice
willprice / .travis.yml
Last active June 10, 2025 17:13
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@VGonPa
VGonPa / dark_theme.txsprofile
Created October 10, 2014 12:52
TexStudio Dark theme settings
[General]
IniMode=true
[formats]
data\align-ampersand\bold=true
data\align-ampersand\fontFamily=<default>
data\align-ampersand\foreground=#dc322f
data\align-ampersand\italic=false
data\align-ampersand\overline=false
data\align-ampersand\pointSize=0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.