View SamL.ps1
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
function SamL ($a) {$a = $a -replace "[^\w\s]",""; $b = $a.split(" ") | %{"a" + $_.substring(1) + $_[0].ToString().tolower() + "ay" }; [string]::Join(" ", $b) | Out-String } | |
function DecryptSamL ($a) {$b = $a.split(" ") | %{$_[$_.Length-3] + $_.Substring(1, $_.Length-4) }; [string]::Join(" ", $b) | Out-String } |
View Meme.ps1
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
Function ToMeme($a){$b=""; foreach($c in $a.tochararray()){$b="$b $c"}; return $b.Trim(' ');} |
View Converters.py
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
# Converters | |
def hexToBin(h): | |
return bin(int(h,16))[2:] | |
def binToHex(b): | |
return '{:0{}X}'.format(int(b,2), len(b) // 4) | |
def decToBin(i): | |
s = "" | |
while i: |
View one_git_alias_to_rule_them_all
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
finda = "!grepalias() { git config --global --get-regexp alias | grep -i \"$1\" | awk -v nr=2 '{sub(/^alias\\./,\"\")};{printf \"\\033[31m%_10s\\033[1;37m\", $1};{sep=FS};{for (x=nr; x<=NF; x++) {printf \"%s%s\", sep, $x; }; print \"\\033[0;39m\"}'; }; grepalias" |
View Tmux Style
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
###################### | |
### DESIGN CHANGES ### | |
###################### | |
# panes | |
set -g pane-border-fg black | |
set -g pane-active-border-fg brightred | |
## Status bar design | |
# status line |
View Default (windows).sublime-keymap
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
Show hidden characters
[ | |
// jk to exit insert mode | |
{ "keys": ["j", "k"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
}, |
View SDL_MessageBox.cpp
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
const SDL_MessageBoxButtonData buttons[] = { | |
{ /* .flags, .buttonid, .text */ 0, 0, "no" }, | |
{ SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, 1, "ok" }, | |
}; | |
const SDL_MessageBoxColorScheme colorScheme = { | |
{ /* .colors (.r, .g, .b) */ | |
/* [SDL_MESSAGEBOX_COLOR_BACKGROUND] */ | |
{ 255, 0, 0 }, | |
/* [SDL_MESSAGEBOX_COLOR_TEXT] */ | |
{ 0, 255, 0 }, |
View seascape.glsl
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
/* | |
"Seascape" by Alexander Alekseev aka TDM - 2014 | |
License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
Contact: tdmaav@gmail.com | |
*/ | |
const int NUM_STEPS = 8; | |
const float PI = 3.1415; | |
const float EPSILON = 1e-3; | |
float EPSILON_NRM = 0.1 / iResolution.x; |
View ReadAllBytes.cpp
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
typedef unsigned char BYTE; | |
std::vector<BYTE> ReadAllBytes(const std::string& filename) | |
{ | |
using namespace std; | |
ifstream file(filename.c_str(), ios::binary | ios::ate); | |
file >> noskipws; | |
streampos fileSize = file.tellg(); | |
file.seekg(0, ios::beg); |
View TextureSetup.cpp
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
#define STB_TRUETYPE_IMPLEMENTATION | |
#include "stb_truetype.h" | |
typedef unsigned char BYTE; | |
std::vector<BYTE> ReadAllBytes(const std::string& filename) | |
{ | |
using namespace std; | |
ifstream file(filename.c_str(), ios::binary | ios::ate); | |
file >> noskipws; |
OlderNewer