Skip to content

Instantly share code, notes, and snippets.

View starikovs's full-sized avatar
👨‍💻
Coding

Viacheslav Starikov starikovs

👨‍💻
Coding
View GitHub Profile
rm -rf ~/.atom
rm -rf /usr/local/bin/atom
rm -rf /usr/local/bin/apm
rm -rf /Applications/Atom.app
rm -rf ~/Library/Preferences/com.github.atom.plist
rm -rf ~/"Library/Application Support/com.github.atom.ShipIt"
rm -rf ~/"Library/Application Support/Atom"
rm -rf ~/"Library/Saved Application State/com.github.atom.savedState"
rm -rf ~/Library/Caches/com.github.atom
rm -rf ~/Library/Caches/com.github.atom.Shipit
@starikovs
starikovs / Handlebars_backbone.html
Last active April 13, 2016 19:34
Webpack for Backbone.js
<script id="some-template" type="text/x-handlebars-template">
<input value="{{name}}">
</script>
<script>
// Inside view
const Hello = Backbone.View.extend({
el: '#hello-container',
template: Handlebars.compile($('#input-template').html()),
--- moving around ---
h j k l
2h 3j 4k 5l
0 ^ $
w b e, W B E
fx Fx
tx Tx
G 3G
@starikovs
starikovs / alt-checkbox-demo.php
Last active December 14, 2015 18:09
Php alt-checkbox demo snippet
<?php if (isset($_POST['checkbox1'])) : ?>
<p style="color: #ffa500">Checked!</p>
<?php endif; ?>
<form action="demo.php" method="post">
<input type="checkbox" id="checkbox1" name="checkbox1" <?php if (isset($_POST['checkbox1'])) : ?> checked<?php endif; ?>>
<label for="checkbox1" >Check Me! I'm medium.</label>
<br><br>
<input type="submit">
</form>
@starikovs
starikovs / gist:5008245
Last active December 14, 2015 01:39
alt-checkbox demo page
<!DOCTYPE html>
<html>
<head>
<title>alt-checkbox demo</title>
<!-- Include jQuery library to the head section -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<!-- @import the desired icon font in the alt-checkbox-icon-font.css and
include this css file in the head section, Font Awesome is used by default -->
@starikovs
starikovs / gist:4980567
Last active December 13, 2015 21:58
Big alt-checkbox.
<input type="checkbox" id="checkbox3">
<label for="checkbox3">Check Me! I'm big.</label>
<script>
jQuery("#checkbox3").altCheckbox({
iconClass: "fontawesome-remove",
sizeClass: "big"
});
</script>
@starikovs
starikovs / gist:4980428
Last active December 13, 2015 21:49
Medium alt-checkbox.
<input type="checkbox" id="checkbox2">
<label for="checkbox2">Check Me! I'm medium.</label>
<script>
jQuery("#checkbox2").altCheckbox({
// Some options can be placed here.
// Don't pass any options to use defaults.
});
</script>
@starikovs
starikovs / gist:4980295
Last active December 13, 2015 21:49
Small alt-checkbox.
<input type="checkbox" id="checkbox1">
<label for="checkbox1">Check Me! I'm small.</label>
<script>
jQuery("#checkbox1").altCheckbox({
outlineUnchecked: false,
sizeClass: "small"
});
</script>
@starikovs
starikovs / osx
Last active August 29, 2015 14:03
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
(the -w makes it permanent, i.e. it'll be reloaded when you reboot)
(How do you turn this off once it's started this way?)
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
--- home, end, page up, page down ---
Fn + left
Fn + right
@starikovs
starikovs / bash
Last active August 29, 2015 14:00
--- basic moves ---
ctrl+b (move back one character)
ctrl+f (move forward one character)
ctrl+d (delete current character)
backspace/mac delele (delete previous character)
ctrl+- (undo)
--- moving faster ---