This file contains hidden or 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
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
import sys | |
import re | |
import shlex | |
from subprocess import Popen, PIPE, check_output |
This file contains hidden or 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
export ZSH="/Users/miksu/.oh-my-zsh" | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
ZSH_THEME="robbyrussell" | |
# https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/git | |
# https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/yarn | |
# https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/dotenv |
This file contains hidden or 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 React, {useState} from 'react'; | |
import {List, StyledList} from 'baseui/dnd-list'; | |
function App() { | |
const [items, setItems] = useState([ | |
{ label: 'Item 1', type: 'basic'}, | |
{ label: 'Item 2', type: 'custom'} | |
]); | |
return <List | |
items={this.state.items} |
This file contains hidden or 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
// Redux-saga debounce input | |
import { call, cancel, fork, put, take } from "redux-saga/effects" | |
import { setSearchResults } from "./actions" | |
import { api } from "./services" | |
import { delay } from "./utils" | |
export default function* searchSaga() { | |
yield [ | |
// Start a watcher to handle search workflow | |
fork(watchSearch) |
This file contains hidden or 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
{ | |
"folders": | |
[ | |
{ | |
"path": "/Users/miksu/Projects/cf-www-next" | |
} | |
], | |
"settings": { | |
"js_prettier": { | |
"auto_format_on_save": true, |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am tajo on github. | |
* I am miksu (https://keybase.io/miksu) on keybase. | |
* I have a public key whose fingerprint is 41D8 8B66 035C 0F06 4228 70F7 B258 E84B 3194 642E | |
To claim this, I am signing this object: |
This file contains hidden or 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
// https://tc39.github.io/ecma262/#sec-array.prototype.includes | |
if (!Array.prototype.includes) { | |
Object.defineProperty(Array.prototype, 'includes', { | |
value: function(searchElement, fromIndex) { | |
// 1. Let O be ? ToObject(this value). | |
if (this == null) { | |
throw new TypeError('"this" is null or not defined'); | |
} |
This file contains hidden or 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 prettier = require('prettier'); | |
const glob = require('glob'); | |
const fs = require('fs'); | |
// check if the glob was passed (user wants to run it only for a subset of files) | |
const args = process.argv.slice(2); | |
console.log(args[0]); | |
const files = glob.sync(args[0] ? args[0] : '**/*.js', { | |
ignore: [ |
This file contains hidden or 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
#!/usr/bin/python | |
import sys | |
import time | |
import binascii | |
from des_wrapper import des_decrypt | |
_pythonMajorVersion = sys.version_info[0] | |
def bitfield(n): | |
bits = [int(digit) for digit in bin(n)[2:]] |
This file contains hidden or 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
#!/usr/bin/python | |
import binascii | |
import sys | |
import time | |
import base64 | |
from des import * | |
_pythonMajorVersion = sys.version_info[0] | |
def xor_bits(list1, list2): | |
res = [] |
NewerOlder