Skip to content

Instantly share code, notes, and snippets.

View martin12333's full-sized avatar

Martin Milan martin12333

View GitHub Profile
@skovsgaard
skovsgaard / hyperpolyglot-elixir
Last active May 17, 2022 14:58
The content for the Hyperpolyglot entry on Elixir
elixir
======
version used
------------
1.2
show version
------------
$ elixir -v
@nepsilon
nepsilon / 5-handy-javascript-one-liners.md
Last active March 23, 2019 18:09
5 handy Javascript one-liners — First published on fullweb.io issue #48

5 handy JavaScript one-liners

1. Generate a random string:

Math.random().toString(36).substr(2); 

This simply generates a random float, casts it into a String using base 36 and remove the 2 first chars 0 and. Note that this is not a replacement for UUID generation.

2. Clone an array:

@TravelingTechGuy
TravelingTechGuy / get_history.sh
Created May 9, 2016 14:10
Get your Chrome history as a CSV file
#!/bin/bash
# Locate the history file in your profile, and copy it to the same folder as this script.
# On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History
# On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History
sqlite3 History <<!
.headers on
.mode csv
.output out.csv
@psychemedia
psychemedia / Dockerfile
Last active November 10, 2022 15:52
First sketch of a contentmine dockerfile
FROM node:4.3.2
##Based on
MAINTAINER Tony Hirst
RUN apt-get clean -y && apt-get -y update && apt-get -y upgrade && \
apt-get -y update && apt-get install -y wget ant unzip openjdk-7-jdk && \
apt-get clean -y
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@maxfi
maxfi / gnome-terminal-fullscreen.desktop
Created February 13, 2016 09:41
Start gnome terminal in fullscreen
[Desktop Entry]
Name=iTerm
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal --full-screen
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
commit 3f5e3bdbb45bc2cd9ae95972420eb11b0340f120
Author: Matthew Garrett <mjg59@coreos.com>
Date: Mon Feb 1 13:31:00 2016 +1100
Block most UEFI variable deletions
Some systems appear to become upset if certain UEFI non-volatile variables
are delted, to the point of no longer POSTing successfully. For a short-term
fix, let's just block deletion of most variables while we figure out a
better approach.
@parmentf
parmentf / GitCommitEmoji.md
Last active June 13, 2024 12:23
Git Commit message Emoji
@claymcleod
claymcleod / pycurses.py
Last active May 18, 2024 09:55
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()