Skip to content

Instantly share code, notes, and snippets.

@golf1052
golf1052 / touch.ps1
Created January 15, 2017 21:15
Touch for Powershell
function Set-FileTime{
param(
[string[]]$paths,
[bool]$only_modification = $false,
[bool]$only_access = $false
);
begin {
function updateFileSystemInfo([System.IO.FileSystemInfo]$fsInfo) {
$datetime = get-date

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,.site-footer,.repository-sidebar,.file-navigation,.gh-header-meta,.gh-header-actions,#wiki-rightbar,#wiki-footer,.commit-tease').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); var removeMe = document.getElementsByClassName("file-header")[0]; removeMe.parentNode.removeChild(r
@dominictarr
dominictarr / papers.md
Last active November 29, 2024 02:52
Distributed Systems Papers

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf

@ybakos
ybakos / Random.jack
Created November 3, 2014 20:12
Jack Pseudo Random Numbers for Nand 2 Tetris
/* Random.jack
* By Mark Armbrust
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Random-number-generator-for-hack-cpu-td4025503.html
* Also see:
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Pseudo-Random-Number-Generator-td4026059.html#a4027617
*/
class Random {
static int seed;
@phuckewe
phuckewe / synchronet-install
Created August 27, 2014 17:59
Steps for successfully installing Synchro.NET BBS on Linux Ubuntu 14.04 (Digital Ocean)
I made these steps using the tools provided by DigitalOcean, but these steps should work verbatim on any Ubuntu Server.
Download Terminfo: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/terminfo
Download Termcap: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/termcap
I. Pre-Requisites:
apt-get update
apt-get install make g++ linux-libc-dev libncurses5-dev libnspr4-dev cvs libcap2-dev gdb zip unzip lrzsz gkermit
apt-get install dosemu
II. BBS Install:
@ColemanGariety
ColemanGariety / pascal.scm
Last active April 26, 2018 19:31
An implementation of pascal's triangle in scheme.
;; 1
;; 1 1
;; 1 2 1
;; 1 3 3 1
;; 1 4 6 4 1
;; pascal's triangle
(define (pascals-triangle h)
;; row iterator
(define (gen-row row)
@larrybotha
larrybotha / A.markdown
Last active November 21, 2024 08:06
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active January 30, 2025 09:22
How to use images for radio buttons (input-radio).
@rxaviers
rxaviers / gist:7360908
Last active April 20, 2025 14:21
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: