This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import cycle | |
for i in cycle((0, 1, 2,)): | |
print i | |
escape_value += 1 | |
if escape_value >= 10: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype plugin indent on | |
syntax on | |
set hidden "???? | |
"set number "line numbers | |
set wildmenu "completion | |
set ruler | |
set shiftwidth=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "screen-256color" | |
set -g status-bg black | |
set -g status-fg white | |
set-window-option -g window-status-fg white | |
# active window title colors | |
set-window-option -g window-status-current-fg black | |
set-window-option -g window-status-current-bg white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (->> [1 3 5] cycle (take 1) (reduce +)) | |
1 | |
user=> (->> [1 3 5] cycle (take 10) (reduce +)) | |
28 | |
user=> (->> [1 3 5] cycle (take 100) (reduce +)) | |
298 | |
user=> (->> [1 3 5] cycle (take 1000) (reduce +)) | |
2998 | |
user=> (->> [1 3 5] cycle (take 10000) (reduce +)) | |
29998 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime_plugin | |
from time import time | |
class InsertEpochTimeCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
self.view.insert(edit, self.view.sel()[0].begin(), str(int(time()))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 'wrap' any function to print the arguments | |
;; with the intention of visualizing what happens | |
;; when you pass a function to reduce | |
;; first version | |
(defn wrap [f & args] | |
(println args) | |
(apply f args)) | |
(wrap + 4 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Jars/PostEffect" | |
{ | |
HLSLINCLUDE | |
#include "../PostProcessing/Shaders/StdLib.hlsl" | |
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex); | |
float _Blend; | |
float4 Frag(VaryingsDefault i) : SV_Target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec2 poltocar( vec2 pol ) { | |
return vec2( pol.x * cos(pol.y), pol.x * sin(pol.y) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CMapChunk::Create, macOS build 12340 | |
do { | |
subchunks_ = *subchunks; | |
remainingDataBytes = remainingSubchunkBytes - 8; | |
currentChunkData_ = subchunks + 8; | |
if (*subchunks == 'MCNR') { | |
this->pMcnrData = currentChunkData_; | |
*(subchunks + 4) = 448; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 Olivier Gillet. | |
// | |
// Author: Olivier Gillet (ol.gillet@gmail.com) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |