Skip to content

Instantly share code, notes, and snippets.

@agnoster
agnoster / README.md
Last active March 10, 2025 15:41
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@danielcompton
danielcompton / gist:5582392
Last active June 5, 2018 15:48
List directory with up to 8 million files. Script taken from https://coderwall.com/p/h6rifq Download the file, compile it: gcc listdir.c -o listdir And use it like this: ./listdir [target dir] > target-ls.txt
#define _GNU_SOURCE
#include <dirent.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#define handle_error(msg) \
@noahbass
noahbass / wordoftheday.php
Created July 13, 2013 00:43
For getting the word of the day from dictionary.com and displaying it nice and pretty.
<?php
// adapted from http://bavotasan.com/2010/display-rss-feed-with-php/
$rss = new DOMDocument();
$rss->load('http://dictionary.reference.com/wordoftheday/wotd.rss'); // calling dictionary.com
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
@palaniraja
palaniraja / Tinderizer-Bookmarklet.js
Last active February 27, 2023 17:32
Tinderizer - Send to kindle bookmarklet
javascript: (function () {
var setupDiv = function () {
var id = 'Tinderizer';
var div = document.getElementById(id);
var body = document.getElementsByTagName('body')[0];
if (null != div) {
body.removeChild(div);
}
div = document.createElement('div');
div.id = id;
@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 24, 2025 04:42
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@michaelmob
michaelmob / StartPage Bangs
Last active November 4, 2023 11:18
Adds !s to StartPage, like DDG
// ==UserScript==
// @name StartPage Bangs
// @namespace http://tarkus.co/
// @version 0.1
// @description Adds !s to StartPage, like DDG
// @match https://startpage.com/*
// @run-at document-start
// ==/UserScript==
// Bangs
@Hellowlol
Hellowlol / whatthefork
Last active November 21, 2022 07:55
Check all forked branches if they are ahead of master/self open in browser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Dirty script to check if any forks in ahead of master and open that branch commitlist
Warning: Uses alot of api calls
"""
import requests
from requests.auth import HTTPBasicAuth
@esolitos
esolitos / README.md
Last active December 7, 2018 19:20 — forked from magnetikonline/README.md
@0xjac
0xjac / private_fork.md
Last active April 24, 2025 01:17
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git