Skip to content

Instantly share code, notes, and snippets.

View alexozer's full-sized avatar
💭
(♡ヮ♡)

Alex Ozer alexozer

💭
(♡ヮ♡)
View GitHub Profile
> 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)
(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)
)
(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)
)
/* 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
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))
)
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
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.
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.