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
require "open-uri" | |
def github_activity username | |
open("https://github.com/#{username}") { |io| io.read } | |
.scan(/fill="#(.{6})" data-count="(\d+)"/) | |
.map { |i| {color: i[0], value: i[1].to_i} } | |
end | |
p github_activity "your-username" |
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
# /bin/bash | |
cd '/Library/Application Support/Pulse Secure/Pulse' | |
sudo sed -i '' \ | |
s'/connection-policy-override: "false"/connection-policy-override: "true"/' \ | |
connstore.dat | |
sudo killall PulseTray 'Pulse Secure' dsAccessService |
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
// Copyright (C) 2019 Dmitry Yakimenko ([email protected]). | |
// Licensed under the terms of the MIT license. See LICENCE for details. | |
using System; | |
using System.IO; | |
using System.Linq; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; |
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
// Copyright (C) 2019 Dmitry Yakimenko ([email protected]). | |
// Licensed under the terms of the MIT license. See LICENCE for details. | |
using System; | |
using System.IO; | |
using System.Linq; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; |
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
#!/usr/bin/env node --expose-gc | |
// | |
// Logest word | |
// | |
function findLongestWordLengthForLoop(str) { | |
let maxVal = 0; | |
const wordArr = str.split(' '); |
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
#!/bin/bash | |
set -euo pipefail | |
$REPO_DIR=~/devel | |
repos="1password bitwarden dashlane lastpass opvault passwordbox roboform stickypassword truekey zoho-vault" | |
# pull all repos | |
( | |
for repo in $repos; do | |
echo $repo |
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
#!/usr/bin/env ruby | |
# | |
# DSL implementation | |
# | |
$stack = [""] | |
def emit x | |
$stack.last << x |
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
#!/usr/bin/env ruby | |
begin | |
require "parallel" | |
PARALLEL = true | |
rescue LoadError | |
PARALLEL = false | |
end | |
def each collection, &block |
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
# @param {String} s | |
# @return {Integer} | |
def num_decodings(s) | |
return 0 if s.empty? | |
n1 = 1 | |
n2 = 0 | |
i = 0 | |
while i < s.size |
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
#!/bin/bash | |
set -e | |
# Clone repos locally into original/ | |
( | |
mkdir original | |
cd original | |
git clone [email protected]:detunized/lastpass-sharp.git |
NewerOlder