Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Vikrum vikrum

🎯
Focusing
View GitHub Profile
View aws-console-actions.json
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now/m-1m",
"lt": "now/m"
}
}
View aws-prefixes.txt
a4b
accessanalyzer
acm
acm-pca
alexaforbusiness
amplify
api
apigateway
apigatewaymanagementapi
apigatewayv2
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href=".css">
<script src=".js"></script>
</head>
<body>
@vikrum
vikrum / 401k
Last active Jan 18, 2017
Quantopian 401K simplified SPY model; front loaded (4 pay cycles) VS throughout year (26 pay cycles) of $27k
View 401k
def initialize(context):
# Reference to SPY
context.spy = sid(8554)
schedule_function(buySpread, date_rules.week_start(), time_rules.market_open())
def buyFront(context, data):
weekno = get_datetime('US/Eastern').isocalendar()[1]
# Invest in first 4 pay cycles
if (weekno % 2 == 0) and (weekno <=8):
if data.can_trade(context.spy):
View openscad
// http://budweiser.cadstudio.cz/2015/08/shadow-cube-3d-model-of-c-d.html
$fn=100;
S=10; // size in mm
// "C" "A" "D" - modelled letters
intersection() {
M("A", S); // "A"
@vikrum
vikrum / Base64-2.3.7-MIT.java
Created Sep 18, 2014
iHarder Base64 — MIT licensed by author via email Sept. 2014
View Base64-2.3.7-MIT.java
/**
* <p>
* This file is licensed under the MIT License as read at
* http://www.opensource.org/licenses/mit-license.php
* and reproduced here:</p>
*
* <blockquote>Copyright (c) 2009 Robert Harder.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@vikrum
vikrum / dcurl.sh
Last active Aug 29, 2015
curl debug
View dcurl.sh
curl -so /dev/null -w "url_effective = %{url_effective}\n http_code = %{http_code}\n http_connect = %{http_connect}\n time_total = %{time_total}\n time_namelookup = %{time_namelookup}\n time_connect = %{time_connect}\n time_appconnect = %{time_appconnect}\n time_pretransfer = %{time_pretransfer}\n time_redirect = %{time_redirect}\n time_starttransfer = %{time_starttransfer}\n size_download = %{size_download}\n size_upload = %{size_upload}\n size_header = %{size_header}\n size_request = %{size_request}\n speed_download = %{speed_download}\n speed_upload = %{speed_upload}" https://zzz
View delete_all_tweets.py
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
@vikrum
vikrum / spin.c
Created Apr 1, 2014
Terminal screensaver/session activity bumper thing.
View spin.c
/* .. spin ..
*
* $ gcc spin.c -o spin -lncurses -Wall -O3
*
* vsn - 2006
*/
#include <stdlib.h> // srand
#include <time.h> // time
#include <string.h>
You can’t perform that action at this time.