Skip to content

Instantly share code, notes, and snippets.

💻
Work work

Wojtek Siudzinski suda

💻
Work work
Block or report user

Report or block suda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@juanriaza
juanriaza / bicimad.py
Created Jun 11, 2019
bicimad stations
View bicimad.py
import json
import gzip
import requests
import binascii
response = requests.post(
'https://api.bicimad.com/emt_v10/',
json={
"app_hash":"c26a08fe1d186dad371881fd6a3fab29438a8c48_com.emtmadrid.bicimad.gestion2",
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active Nov 13, 2019
MicroK8s add --allow-privileged=true flag
View allow-privileged-for-microk8s.md

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@andyvanee
andyvanee / .ssh_config
Last active Nov 13, 2019
Fix unix_listener too long for Unix domain socket
View .ssh_config
Host *
ControlPath ~/.ssh/control/%C
ControlMaster auto
@bitoiu
bitoiu / instructions.md
Last active Nov 14, 2019
Self-Signed Wildcard certificate with SAN using openssl / SSL
View instructions.md

Copy the default template of openssl.cnf to a writable location.

cp /System/Library/OpenSSL/openssl.cnf src

Uncomment the req_extensions = v3_req

req_extensions = v3_req # The extensions to add to a certificate request

Add subjectAltName to v3_req section

@phanan
phanan / runner.js
Last active Jul 18, 2019
Record a webpage with PhantomJS and FFMpeg
View runner.js
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
@dmiddlecamp
dmiddlecamp / holiday_strip.ino
Last active Aug 29, 2015
Holiday Strip code
View holiday_strip.ino
// This #include statement was automatically added by the Spark IDE.
#include "neopixel/neopixel.h"
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D2
#define PIXEL_COUNT 300
#define PIXEL_TYPE WS2812B
int reds[PIXEL_COUNT];
int greens[PIXEL_COUNT];
@peel
peel / gist:ca8c5b25efbe3052fdb5
Last active Jan 26, 2019
SJ4000 WIFI Protocol
View gist:ca8c5b25efbe3052fdb5

#Base URL http://192.168.1.254

File Management Panel

GET / file management panel

Configuration options

all options follow the template: /?custom=1&cmd={Command}&par={Option} Command - setting/mode of the device

@frdmn
frdmn / osx-10-10-virtualbox.md
Last active Jun 20, 2019
Install OS X 10.10 Yosemite in VirtualBox
View osx-10-10-virtualbox.md
@kennwhite
kennwhite / multi_key_crypto.sh
Last active May 16, 2019
OpenSSL command line recipe for multi-public key file encryption. Any single private key paired to one of the public keys can decrypt the file.
View multi_key_crypto.sh
#!/usr/bin/env bash
#
# Example of multiple key AES encryption for text files using the openssl v. 0.9.8+ command line utility
# Uses n public certs as key for MIME PKCS envelope, any individual private key can decrypt.
#
# If standard RSA ssh keys exist, these can be converted to public certs as well (and ssh keys can decrypt)
#
# To sign (and verify) the encrypted file, one of the private keys is required, see:
# http://www.openssl.org/docs/apps/smime.html#EXAMPLES for openssl smime examples
# or http://www.openssl.org/docs/apps/cms.html#EXAMPLES for cms utility (OpenSSL v. 1.0+)
@matthiasplappert
matthiasplappert / gist:9493050
Last active Aug 29, 2015
QuickLook Debugging for `UIView`
View gist:9493050
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
You can’t perform that action at this time.