Skip to content

Instantly share code, notes, and snippets.

View doublerebel's full-sized avatar

Charles Phillips doublerebel

View GitHub Profile
@sscotth
sscotth / keystroke the clipboard extended.workflow
Last active July 16, 2024 15:35
Paste as keystrokes (macOS)
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
#
@mohsen1
mohsen1 / keybindings.json.yaml
Last active November 4, 2018 19:23
Sublime Text key bindings for Visual Studio Code
[
{
"key": "shift+cmd+d",
"command": "editor.action.copyLinesDownAction"
},
{
"key": "cmd+l",
"command": "expandLineSelection"
},
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="pm2">
<service name="application/pm2" type="service" version="1">
<create_default_instance enabled="true"/>
<single_instance/>
@ktkaushik
ktkaushik / redis.sh
Created June 25, 2015 12:09
LUA Eval script to Delete/Expire multiple keys in Redis
EVAL "for i, name in ipairs(redis.call('KEYS', 'author_*')) do redis.call('expire', name, 0); end" 0
@mox1
mox1 / opensles_android.cpp
Last active August 29, 2015 14:19
How to use Opensl ES (aka low level audio) on Android - Part of a Spotify mobile App I wrote
/* Code Written by mox1
* http://moxone.me/
* The code contained within is part of a larger Android Application. Portions of this code
* also rely on the "Poco" C++ library.
*
* Copyright (c) 2015, mox1@moxone.me
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@3rd-Eden
3rd-Eden / README.md
Last active January 4, 2021 10:20
Protecting against POODLE in node.js

[Google recently announced][poodle] that there is an exploit in SSLv3, this vulnerability is know as POODLE. There is no other option than to disable SSLv3 in order to combat this major flaw. There have already been [guides on how to disable this in different servers][guides]. But nothing excised for Node.js yet, until now. In order to resolve this for Node.js we need to use various of undocumented options and modules.

In the index.js file below you can see an example of how you can protect your HTTPS server against the POODLE attack. It uses the secureOptions option to pass in constants in to the SSL context which is created by node.

@weilu
weilu / auth.js
Last active August 20, 2019 15:35
Cloudant create user
var cradle = require('cradle');
var crypto = require('crypto');
cradle.setup({
host: 'foo.cloudant.com',
port: 80,
cache: false,
timeout: 5000
})
@subudeepak
subudeepak / WebSockets.md
Last active May 31, 2024 09:36
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@szepeviktor
szepeviktor / nginx-chroot-helper.sh
Last active August 10, 2016 10:51
nginx Chroot Helper Script To Copy Libs To /lib64 and /usr/lib64
#!/bin/bash
set -e
# Use this script to copy shared (libs) files to nginx chrooted
# jail server. This is tested on 64 bit Linux (Redhat and Friends only)
# ----------------------------------------------------------------------------
# Original Written by Vivek Gite <http://www.cyberciti.biz/>
# (c) 2006 nixCraft under GNU GPL v2.0+
# ----------------------------------------------------------------------------
# See url for usage: