Skip to content

Instantly share code, notes, and snippets.

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

Oromion carlosal1015

πŸ‡΅πŸ‡ͺ
Studying mathematics
View GitHub Profile
@carlosal1015
carlosal1015 / CMakeLists.txt
Created June 17, 2021 02:16 — forked from pangyuteng/CMakeLists.txt
Sample code to build a cython module via Scikit Build; Dockfile also contains instructions for building ITK VTK Boost (with Python 3.7 via Conda) Zlib with CMake in Ubuntu.
cmake_minimum_required(VERSION 3.5)
project(_hello)
# Find python and Boost - both are required dependencies
find_package(PythonLibs REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(PythonExtensions REQUIRED)
find_package(Cython REQUIRED)
find_package(ZLIB REQUIRED)
@carlosal1015
carlosal1015 / PKGBUILD.Asl
Created May 20, 2021 15:40 — forked from Libbum/PKGBUILD.Asl
Ipopt 3.13.0
# ASL
pkgname=coinasl
pkgver=1.4.1
pkgrel=1
pkgdesc="COIN-OR autotools harness to build AMPL Solver Library"
arch=('i686' 'x86_64')
url="https://github.com/coin-or-tools/ThirdParty-ASL/"
#license=('')
groups=('coin-or')

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.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlosal1015
carlosal1015 / Correct_GnuPG_Permission.sh
Created April 4, 2021 21:09 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@carlosal1015
carlosal1015 / .gitignore
Created March 19, 2021 00:30 — forked from chichunchen/.gitignore
Git ignore binary files
# Ignore all
*
# Unignore all with extensions
!*.*
# Unignore all dirs
!*/
### Above combination will ignore all files without extension ###
@carlosal1015
carlosal1015 / reposync.sh
Created February 22, 2021 15:24 — forked from amlamarra/reposync.sh
A Bash script to update multiple Git repositories at the same time. It also maintains a list of these repos in a text file to keep synced with your dotfiles across other systems.
#!/usr/bin/env bash
#########################################################################
## Title: reposync.sh
## Description: Syncs multiple git repositories in ~/tools/ based on the
## ~/.repolist file. Put each repo URL in there.
## Author: Andrew Lamarra
## Created: 01/23/2019
## Dependencies: bash (v4.0+), git
#########################################################################
@carlosal1015
carlosal1015 / Instructions_UML_Python.rst
Created February 10, 2021 18:33 — forked from HarshaVardhanBabu/Instructions_UML_Python.rst
Generating UML diagrams in python using pyreverse

Requirements

  1. Install Pylint from Install. If you have anaconda already installed use pip install -U pylint to update the Pylint so that pyreverse is added to the scripts folder.

  2. You need to install Graphviz as the pyreverse generates the UML diagrams in dot format and needs the dot.exe provided by Graphviz. Once Graphviz is installed make sure the bin folder is added to the PATH variable so that pyreverse can find it at run time. "the command pyreverse generates the diagrams in all formats that graphviz/dot knows." (Reference

  3. Now add the path of python modules for which you want to generate the documentation to PYTHONPATH.

  4. Use pyreverse -S <modulename> to generate dot files in the current folder

    Usage:

@carlosal1015
carlosal1015 / Dockerfile
Created February 8, 2021 21:09 — forked from behackl/Dockerfile
Manim Community v0.3.0 interactive release tour (mybinder.org)
FROM manimcommunity/manim:v0.3.0
COPY --chown=manimuser:manimuser . /manim