Skip to content

Instantly share code, notes, and snippets.

View akolybelnikov's full-sized avatar
:octocat:
Building the future, one line of code at a time. 🚀

reddree akolybelnikov

:octocat:
Building the future, one line of code at a time. 🚀
View GitHub Profile
@akolybelnikov
akolybelnikov / index.html
Created January 31, 2017 16:20
Random Quote machine
<div id='main' class="row">
<div id="center" class="small-8 small-centered large-centered large-10 columns">
<h3>John Norris' quote machine</h3></br>
<div id="quote"></div>
<div class='fixed'><button id="btn" class="button extend" data-url="/">Get a quote</button></div>
<div class="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-via="rokkapi" data-size="large" data-dnt="true">Tweet</a></div>
</div>
</div>
@akolybelnikov
akolybelnikov / any.component.html
Created July 6, 2018 17:21 — forked from arniebradfo/any.component.html
Angular *ngFor recursive list tree template
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
@akolybelnikov
akolybelnikov / .bashrc
Last active April 21, 2020 12:47 — forked from pavbsu/.bashrc
Git Bash aliases for Windows
# create a file C:\Users\[user]\.bashrc
# add this content
# add your own aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
# run `source ~/.bashrc` in console
alias la='ls -A'
alias l='ls -CF'
alias gs='git status -bsu'
@akolybelnikov
akolybelnikov / localStorageMock.ts
Created September 5, 2018 13:48 — forked from wzr1337/localStorageMock.ts
Mock localStorage for jasmine tests in TypeScript. This is the testing script. Copy the parts between snip and snap to mock your localStorage
/// <reference path="../../library.test.d.ts"/>
import * as angular from "angular"; angular;
import * as mocks from "angular-mocks/ngMock"; mocks;
describe('feat(localStorage Mock): ', function() {
beforeAll(() => {
angular.module('mock-module',[])
});
@akolybelnikov
akolybelnikov / slice.go
Created November 1, 2018 20:31
Slice challenge in Go
package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
@akolybelnikov
akolybelnikov / trunc.go
Created November 1, 2018 20:32
Truncate floating point numbers in Go
package main
import (
"fmt"
"log"
"math"
)
func main() {
var userNumber float64
@akolybelnikov
akolybelnikov / findian.go
Created November 1, 2018 20:33
Find characters in a string challenge in Go
package main
import (
"fmt"
"log"
"strings"
)
func main() {
var userInput string
@akolybelnikov
akolybelnikov / read.go
Created November 1, 2018 23:58
Read file and make structs of lines in Go
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
)
@akolybelnikov
akolybelnikov / match-media.js
Created December 4, 2018 07:50 — forked from aliakakis/match-media.js
React based
/*
## Example ##
<MatchMedia mediaWidth={["(min-width: 768px)", "(min-width: 1280px)"]}>
<Checkbox
id="check_1"
label="Hello World!"
checked={isChecked}
onChange={() => this.setState({ isChecked: !isChecked })}
@akolybelnikov
akolybelnikov / hmac_sha1.py
Created January 29, 2019 19:48 — forked from heskyji/hmac_sha1.py
Generate HMAC-SHA1 Signature using Python 3
import hashlib
import hmac
import base64
def make_digest(message, key):
key = bytes(key, 'UTF-8')
message = bytes(message, 'UTF-8')