Skip to content

Instantly share code, notes, and snippets.

View paveljurca's full-sized avatar
🎯
Focusing

Pavel paveljurca

🎯
Focusing
View GitHub Profile
@remy
remy / check.sh
Created August 29, 2016 08:04
Obviously change remysharp.com for the domain you want to check.
curl http://web.archive.org/cdx/search/cdx\?limit\=1\&url\=remysharp.com | awk '{ print $2 }' | xargs date -j -f "%Y%m%d%H%M%S"
@mislav
mislav / update.sh
Created August 14, 2016 11:13
Script to keep your Twitter archive up to date
#!/bin/bash
set -e
cd "${0%/*}"
export GEM_HOME="${PWD}/.gem"
export GEM_PATH="$GEM_HOME"
if [ ! -x "${GEM_HOME}/bin/grailbird_updater" ]; then
/usr/bin/gem install grailbird_updater --no-rdoc --no-ri
fi
@techslides
techslides / wp-sort.php
Last active October 29, 2017 14:05
Sort WordPress Posts by Modified Date using Query Param
<?php
//put this into functions.php and add url param to homepage: sortby=updated
function custom_query_vars_filter($vars) {
$vars[] = 'sortby';
//$vars[] .= 'another';
return $vars;
}
add_filter( 'query_vars', 'custom_query_vars_filter' );
@blackfalcon
blackfalcon / switch.bash
Last active September 4, 2018 20:34
Easy Git branch switcher in the CLI
# put this in your .bashrc
function switch() {
git branch | grep "$1" | pbcopy && tmp=$(pbpaste) && git checkout $tmp
}
# example branch ... 8038031-update-things-long-branch-name-of-things
# use in the CLI
# $ switch 38031 (or any unique searchable string)
@brandur
brandur / stoicreviews.md
Last active October 29, 2017 14:07
SSL Issues

Probably issues (see details below):

  • The certificate returned is invalid.
  • You are not using SNI.

The server is returning an invalid SSL certificate. By the "ST=Some-State" note, I would guess that this was probably self-signed at some point:

$ openssl s_client -showcerts -connect stoicreviews.com:443
CONNECTED(00000003)
!function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="/static/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var a=r(1);n(a)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);t["default"]=i["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,
@cube-drone
cube-drone / automation.md
Last active August 7, 2024 10:34
Automation For The People

Automation for the People

Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.

"Don't Use Manual Procedures".

This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.

The trouble was that I hadn't much of an idea how to actually go

#include <wx/secretstore.h>
void DoSomethingRequiringAPassword(const wxString& username)
{
wxSecretStore store = wxSecretStore::GetDefault();
if ( !store.IsOk() ) {
// Complain about not being able to store the password securely
...
return;
}
@paulirish
paulirish / index.html
Last active March 7, 2019 00:55
array augmenting: push read vs concat (http://jsbench.github.io/#e412522baff1e164b3dd1c679f2f0845) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>array augmenting: push read vs concat</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>