Skip to content

Instantly share code, notes, and snippets.

💭
Using github

Alex Ozer alexozer

💭
Using github
Block or report user

Report or block alexozer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:438562368851c206a3b9ba04dfaa5e60
> git clone git@gitlab.com:UnrealMKB/UnrealMKB.git
Cloning into 'UnrealMKB'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 13476 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (13476/13476), 66.88 MiB | 7.92 MiB/s, done.
Resolving deltas: 100% (5997/5997), done.
Downloading UnrealMKB/Content/Blueprints/BP_ActorUtilMacros.uasset (26 KB)
Downloading UnrealMKB/Content/Blueprints/BP_Level.uasset (270 KB)
View sane-headings2.el
(defun ozer/new-heading (default-enter open-below)
(if (org-at-heading-p)
;; Enter once will make new heading, twice will clear
(if (string= (org-entry-get nil "ITEM") "")
(evil-change (line-beginning-position) (line-end-position))
;; Insert a new TODO if we're on a TODO
(if (org-get-todo-state)
(org-insert-todo-heading-respect-content)
(org-insert-heading-respect-content)
)
View sane-headings.el
(defun ozer/new-org-heading (default-enter)
(if (org-at-heading-p)
;; Enter once will make new heading, twice will clear
(if (eq (org-entry-get nil "ITEM") "")
(evil-change (line-beginning-position) (line-end-position))
;; Insert a new TODO if we're on a TODO
(if (org-get-todo-state)
(org-insert-todo-heading-respect-content)
(org-insert-heading-respect-content)
)
View gist:85dfb977c24e13a27e08e8a5fd372525
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
View gist:faccfb7e720d41de2e572baaa16661c3
def has_won(self, player):
mark = player.mark
size = len(self.board)
return (
any(all(slot == mark for slot in row) for row in self.board) or
any(all(row[col_idx] == mark for row in self.board) for col_idx in range(size)) or
all(self.board[i][i] == mark for i in range(size)) or
all(self.board[i][size - i - 1] for i in range(size))
)
View gist:15b6b08b4c8d5eec19bcb7e6960493c9
def has_won(self, player):
mark = player.mark
size = len(self.board[0])
horiz = any(all(slot == mark for slot in row) for row in self.board)
vert = any(all(row[col_idx] == mark for row in self.board) for col_idx in range(size))
diag1 = all(self.board[i][i] == mark for i in range(size))
diag2 = all(self.board[i][size - i - 1] for i in range(size))
return horiz or vert or diag1 or diag2
View gist:57bc1d0a0ac2bbbc22562bc317e3b059
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
View gist:f1d30ec121c4c59dabf783a29283d941
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
You can’t perform that action at this time.