Skip to content

Instantly share code, notes, and snippets.

View pushrbx's full-sized avatar

pushrbx pushrbx

View GitHub Profile
f = open('MOON PHASE - ANIME.html', 'r')
o = open('output.txt', 'w')
line = True
while line:
line = f.readline().strip()
if line == '<tr>':
line = f.readline().strip() # Date cell
try:
date = line.split('>', 2)[2].split('<', 1)[0]
private class QueryPropagatingRoute : RouteBase {
private readonly RouteBase target;
private readonly string[] queryStringKeys;
public QueryPropagatingRoute(RouteBase target, params string[] queryStringKeys) {
this.target = target;
this.queryStringKeys = queryStringKeys;
}
public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values) {
@panesofglass
panesofglass / FSharpHub.fs
Last active December 15, 2015 08:49
Use SignalR from F# via OWIN
namespace tryfs
open System
open Owin
open Microsoft.AspNet.SignalR
open Microsoft.Owin.Hosting
// Use ImpromptuInterface for dynamic support in the TryFS.Send method.
// Could also use http://fssnip.net/2U or http://fssnip.net/2V
open ImpromptuInterface.FSharp
@epicserve
epicserve / redis_key_sizes.sh
Last active June 29, 2024 03:41
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}
@Logrus
Logrus / CMakeLists.txt
Created April 5, 2014 07:27
PCL Viewer with Qt GUI minimal code
cmake_minimum_required(VERSION 2.6)
PROJECT(qt_vtk_pcl)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
@JamieMason
JamieMason / get-new-execution-context.md
Last active May 9, 2019 15:19
Create a new JavaScript execution context, to safely extend hosts/natives for example.

Create a new JavaScript execution context

Source

const getNewExecutionContext = markup =>
  new Promise(resolve => {
    const iframe = document.createElement('iframe');
    iframe.style.display = 'none';
 iframe.setAttribute('src', 'about:blank');
@IDisposable
IDisposable / DomainRoute.cs
Last active January 14, 2020 16:22
Domain (hostname) Routing for Asp.Net MVC and WebAPI
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Http;
using System.Web.Http.Routing;
using System.Web.Mvc;
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@x1nixmzeng
x1nixmzeng / ws_soulworker.lua
Last active December 22, 2020 17:38
Soul Worker Wireshark Dissector (packet analyser)
-- Soul Worker Wireshark Dissector rev 1
-- Written by WRS/x1nixmzeng (forum.xentax.com)
-- Usage: wireshark.exe -X lua_script:ws_soulworker.lua
local sw_port = 27017
sw_proto = Proto("sw_proto","Soul Worker Protocol")
local sw_method =
{
@TomRichter
TomRichter / OnWipe.xml
Last active April 29, 2024 14:28
Installation Instructions for FFXIV ACT + Key Plugins
<?xml version="1.0"?>
<TriggernometryExport Version="1">
<ExportedTrigger Enabled="true" Name="On Wipe" Id="d2f2668d-dfd5-456d-a404-1d2b5cdd18cd" RegularExpression="(wipeout|0038:end|21:([0-9,a-f,A-F]{8}):40000010)" DebugLevel="Inherit" PrevActions="Keep" PrevActionsRefire="Allow" Scheduling="FromFire" PeriodRefire="Allow" RefirePeriodExpression="0">
<Actions>
<Action DiscordTts="false" OrderNumber="1" AuraImageMode="Normal" TextAuraAlignment="MiddleCenter" TextAuraFontSize="8.25" TextAuraEffect="None" TextAuraUseOutline="false" Enabled="true" ActionType="EndEncounter" ExecutionDelayExpression="0" Asynchronous="true" DebugLevel="Inherit" RefireInterrupt="false" RefireRequeue="true" SystemBeepFreqExpression="1000" SystemBeepLengthExpression="100" PlaySoundVolumeExpression="100" PlaySoundExclusive="true" PlaySoundMyself="false" PlaySpeechMyself="false" UseTTSVolumeExpression="100" UseTTSRateExpression="0" UseTTSExclusive="true" LaunchProcessWindowStyle="Normal" ExecScriptType="CSharp" MessageBoxIcon