Skip to content

Instantly share code, notes, and snippets.

(;GM[1]FF[4]SZ[19]AP[Go Books:4.4.3]
AB[ca:cb][ga:gb][eb][dc][fc][ed]
AW[ba:bb][ha:hb][cc:cd][gc:gd][de:fe]
PL[W]VW[aa:ig]
FG[4353:Problem 202 (1move)])
@sartak
sartak / vagrant-clean.sh
Last active August 1, 2019 17:56 — forked from jdowning/vagrant-clean.sh
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/sartak/4af06edcb3/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@sartak
sartak / 1-anki_mobile_card.html
Last active February 18, 2023 17:15 — forked from redoPop/anki_mobile_card.html
HTML used by AnkiMobile 2.0.88 to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS
<html>
<head>
<meta
name="viewport"
id="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=10,user-scalable=1"
/>
<link type="text/css" rel="stylesheet" href="res/web/css/reviewer.css" />
<script src="res/web/js/vendor/jquery.min.js"></script>
<script src="res/web/js/vendor/css_browser_selector.min.js"></script>

Keybase proof

I hereby claim:

  • I am sartak on github.
  • I am sartak (https://keybase.io/sartak) on keybase.
  • I have a public key whose fingerprint is 38F5 F03C 8CEF B3E2 4B8B 49CE 3756 E254 3144 0520

To claim this, I am signing this object:

<html>
<body>
: block outer -> {
<h1>hello world</h1>
<nav>...</nav>
<div>
: block inner -> { }
: block footer -> {
#import <SpriteKit/SpriteKit.h>
@interface SKTexture (YWName)
@property (nonatomic, strong) NSString *yw_textureName;
@property (nonatomic, strong) NSString *yw_atlasName;
@end
NSError *regexError = nil;
NSRegularExpression *nameRegex = [NSRegularExpression regularExpressionWithPattern:@"^Name:\\s*?(.+)"
options:NSRegularExpressionCaseInsensitive
error:&regexError];
if (!nameRegex) {
NSLog(@"REGEX ERROR: %@", regexError);
}
__block NSString *name = nil;
[nameRegex enumerateMatchesInString:input
if (direction == self.hero.direction) {
self.isAnimating = YES;
[self.hero runAction:[SKAction moveByX:moveByX y:moveByY duration:[self.hero stepAnimationDuration]]];
[self.hero runStepAnimation:^{
self.isAnimating = NO;
}];
}
else {
[self.hero changeDirection:direction];
}
@sartak
sartak / gist:7064731
Created October 20, 2013 03:34
Sample review
<sartak> this the way you wrote it:
sub _build_message {
my $self = shift;
my $line1 = "Attribute (".$self->attribute_name.") does not pass the type constraint because: ";
if( $self->new_member ) {
$line1 = "A new member value for foo does not pass its type constraint because: "
}