Skip to content

Instantly share code, notes, and snippets.

View tripleo1's full-sized avatar

tripleo tripleo1

View GitHub Profile
@Elijah-trillionz
Elijah-trillionz / exercises.py
Created November 5, 2021 09:46
calculate number of days between two dates
# Write a Python program to calculate number of days between two dates.
# (2014, 7, 2), (2014, 7, 11)
import datetime as date
def num_of_days(date_one, date_two):
try:
(year, month, day) = date_one
new_date = date.datetime(year, month, day).timestamp()
/nix/store/x0g3y4xxc00w0a1ykbgmwzw1q0br5vp9-commons-io-2.8.0
└── share
└── java
├── commons-io-2.8.0.jar
├── commons-io-2.8.0-javadoc.jar
├── commons-io-2.8.0-sources.jar
├── commons-io-2.8.0-tests.jar
└── commons-io-2.8.0-test-sources.jar
2 directories, 5 files
@mx00s
mx00s / install.sh
Last active April 1, 2024 08:32
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
#
# NixOS install script synthesized from:
#
# - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings)
# - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs)
# - NixOS Manual (https://nixos.org/nixos/manual/)
#
# It expects the name of the block device (e.g. 'sda') to partition
@hfiref0x
hfiref0x / ntoskrnl
Created December 11, 2019 08:24
ReactOS syscalls
NtAcceptConnectPort 0
NtAccessCheck 1
NtAccessCheckAndAuditAlarm 2
NtAccessCheckByType 3 (STATUS_NOT_IMPLEMENTED)
NtAccessCheckByTypeAndAuditAlarm 4
NtAccessCheckByTypeResultList 5 (STATUS_NOT_IMPLEMENTED)
NtAccessCheckByTypeResultListAndAuditAlarm 6
NtAccessCheckByTypeResultListAndAuditAlarmByHandle 7
NtAddAtom 8
NtAddBootEntry 9 (STATUS_NOT_IMPLEMENTED)
@chris-martin
chris-martin / nixos-from-ubuntu.md
Last active February 17, 2024 18:17
How to install NixOS from an Ubuntu liveCD
@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active May 4, 2024 01:24
Instructions how to install Debian using debootstrap
@n-st
n-st / view-on-archive-org.js
Created February 28, 2016 16:20
Bookmarklet to view current page on the Internet Archive Wayback Machine (https://archive.org/)
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='http://web.archive.org/web/*/'+location.href;}})();
@wangjiezhe
wangjiezhe / advcp_install.sh
Last active October 23, 2022 22:42
install 'cp' and 'mv' utilities with progress bar patches
#!/usr/bin/env bash
set -e
tmpdir=$(mktemp -t -d advcp.XXXXXX)
cd ${tmpdir}
wget https://aur.archlinux.org/packages/ad/advcp/advcp.tar.gz
tar xf advcp.tar.gz
source advcp/PKGBUILD
@mbohun
mbohun / svn2github_migration_with_taking_dump.sh
Last active November 22, 2020 06:39
svn to git/github migration with svdump/svnrdump and svndumpfilter
# PROBLEM:
#
# bash-3.2$ git remote add origin git@github.com:AtlasOfLivingAustralia/ecodata.git
# bash-3.2$ git push origin --all
# Counting objects: 6216, done.
# Delta compression using up to 4 threads.
# Compressing objects: 100% (3094/3094), done.
# Writing objects: 100% (6216/6216), 5.01 MiB | 1.24 MiB/s, done.
# Total 6216 (delta 3011), reused 2195 (delta 907)
# remote: error: GH001: Large files detected.
@JeremyMorgan
JeremyMorgan / OpenGraphHeader.htm
Last active January 16, 2022 21:24
Template for Open Graph Tags. Adding these to your pages will help you display information better on Google+, Facebook and Twitter. Just replace the values with their own.
<meta itemprop="name" content="[ TITLE ]" />
<meta itemprop="image" content="[ LISTING IMAGE ]" />
<meta itemprop="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="author" content="[ AUTHOR FULL NAME ]" />
<meta property="article:author" content="[ GOOGLE+ AUTHOR URL ]" />
<meta property="article:published_time" content="[ PUBLISHED TIMESTAMP ]" />
<meta property="article:section" content="[ CATEGORY ]" />