Skip to content

Instantly share code, notes, and snippets.

View alvarogarcia7's full-sized avatar

Alvaro Garcia alvarogarcia7

View GitHub Profile
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@mjansen401
mjansen401 / core.clj
Created September 26, 2012 02:03
GildedRose Clojure solution (with @patrickgombert)
;the code
(ns gilded-rose.core)
(def vest "+5 Dexterity Vest")
(def brie "Aged Brie")
(def elixir "Elixir of the Mongoose")
(def sulfuras "Sulfuras, Hand of Ragnaros")
(def passes "Backstage passes to a TAFKAL80ETC concert")
(def cake "Conjured Mana Cake")
@ozh
ozh / gist:4131243
Created November 22, 2012 13:44
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

@ijy
ijy / xslt-random-no-generator.xsl
Created September 18, 2013 20:16
Generate a random number between 1- 10 in XSLT. @href: http://www.getsymphony.com/discuss/thread/81429/
<!-- Add the 'math' namespace to your XML stylesheet (so we can use 'math:random') -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:math="http://exslt.org/math"
extension-element-prefixes="math">
<!-- Pick a random number between 1 - 10 and set as a variable -->
<xsl:value-of select="(floor(math:random()*10) mod 10) + 1" />
@trikitrok
trikitrok / next-read.clj
Last active February 3, 2016 10:52
What I use to select my next read from my post reading queue
(defn next-read []
(->>
(clojure.java.io/file ".")
(.listFiles)
seq
(remove #(.isDirectory %))
rand-nth
(.getName)))
(println (next-read))