- Fantastic Timers and Where to Find Them: High-Resolution Microarchitectural Attacks in JavaScript - 9 ways to precisely measure the time from inside of a browser
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
""" | |
How to use: | |
cat test.txt | python logg.py | |
""" | |
import sys | |
keywords = ['mmm'] | |
datetime_str = None | |
# This would be a dictionary |
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 -o pipefail | |
# TODO: .local/share/applications/jetbrains-idea.desktop | |
echo >/dev/null <<_JETBRAINS_IDEA_DESKTOP | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=IntelliJ IDEA | |
Icon=/home/vladimirb/Documents/Applications/idea/bin/idea.png |
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 | |
# Call this file from .bashrc to get useful prompt: | |
# 1. It shows local time and Unix time (number of seconds since 01.01.1970+00:00) | |
# 2. It shows just current working directory | |
# 3. Whenever the current working directory is under control of git, it shows the current branch | |
function __551007e297f511e593a71b4727b21972_ps1() { | |
# Reset | |
Color_Off='\[\e[0m\]' # Text Reset |
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
import System.Environment | |
import Data.List | |
import Data.Maybe | |
data Arguments = Arguments String String | |
| UnexpectedArguments [String] | |
| NotEnoughArguments | |
deriving Show |
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
function err_handle() | |
{ | |
status=$? | |
lastcmd=$(history | tail -1 | sed 's/^ *[0-9]* *//') | |
# Perform autocd | |
if [ -d "$lastcmd" ] | |
then | |
# Comment the following line out if autocd is enabled | |
cd $lastcmd | |
return |
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
# -*- coding: utf-8 -*- | |
import functools | |
import json | |
from tornado import gen | |
class RedisCache(object): | |
""" | |
Redis-based cache. |