Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 10, 2024 16:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@khakimov
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@nicooprat
nicooprat / grid.less
Last active August 1, 2019 09:07
First try to port Unsemantic to LESS. (http://unsemantic.com/)
// http://unsemantic.com/
// -------------------
// Variables
// -------------------
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active May 1, 2024 18:06
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@cosmicmonster
cosmicmonster / ShuffleArray.cs
Last active March 1, 2021 13:36
Unity / C# code to shuffle an array using the Fisher-Yates Shuffle.
using UnityEngine;
using System.Collections;
public class ShuffleArray : MonoBehaviour {
// Public so you can fill the array in the inspector
public int[] scenarios;
void Start ()
@v21
v21 / Extensions.cs
Last active August 29, 2015 14:05
Unity3D new UI convienience extensions
using System.Linq;
using UnityEngine;
using System;
using System.Collections.Generic;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
using Random = UnityEngine.Random;
using UnityEngine.EventSystems;
using UnityEngine.Events;
@d-baker
d-baker / vocab-template.txt
Last active August 29, 2015 14:10
starting points for learning a new language (or designing one)
PHRASES
Hello
Goodbye
Sorry
Thankyou
Yes
No
How are you?
Goodnight
Good morning
quinlan@corinthian:~/.weechat/logs$ grep -E '\w+[A]{3,}[a]*$' irc.esper.#merveilles.weechatlog | sed -E 's/[[:space:]].*//' | sort | uniq -c | sed -E -e 's/^[[:space:]]*//' | gnuplot -e 'set terminal dumb 120 40; set grid; set datafile separator " "; set xdata time; set timefmt "%Y-%m-%d"; plot "< cat" using 2:1 with lines title ""'
25 ++-+---+--+--+---+--+---+--+--+---+--+--+---+--+--+---+--+---+--+--+---+--+--+---+--+--+---+--+--+---+--+---+-++
+ + + + + + + + + + +* +
| : : : : : : : : : :* |
| : : : : : : : : : :* |
| : : : : : : : : : :* |
| : : : : : : : :
@nijotz
nijotz / lolbow.txt
Created June 9, 2016 19:08
LOLBOW winners
[4800x0C:07:19nick@nijotz~/.weechat/logs]$ grep -B1 LOLBOW irc.freenode.#infoforcefeed.weechatlog | grep -Ev '(LOLBOW|--)' | awk '{print $3}' | sort | uniq -c | sort -nr
24 cblgh
17 nijotz
17 jnerula
14 Pilate
12 trinque
11 vhost-
11 uptime
11 ben_vulpes
9 lykkin
#!/usr/bin/python
# -*- coding: utf-8 -*-
import errno
import os
import shutil
from subprocess import check_output
import arrow