Skip to content

Instantly share code, notes, and snippets.

View resistdesign's full-sized avatar
💭
Exploring bypassed terrain.

Ryanne Graff resistdesign

💭
Exploring bypassed terrain.
View GitHub Profile
@andrewh
andrewh / anyconnect.scpt
Last active April 12, 2024 08:48
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server
-- 5. Trigger script from the menu
-- 6. Enjoy being connected
tell application "Cisco AnyConnect Secure Mobility Client"
activate
end tell
@willprice
willprice / .travis.yml
Last active August 15, 2023 17:12
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@Savjee
Savjee / gist:b4b3a21d143a30e7dc07
Created January 16, 2016 18:49
s3-webhosting-bucket-policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@resistdesign
resistdesign / index.js
Created April 21, 2016 05:22
Bindable Demo
function Bindable(ClassRef, onChangeMethodName){
class BindableClass{
constructor(...args){
const instance = new (ClassRef.bind(this))(...args);
for(const k in instance){
if(instance.hasOwnProperty(k)){
const initialValue = instance[k];
const privatePropertyName = `_${k}`;
instance[privatePropertyName] = initialValue;
@resistdesign
resistdesign / FluxDI.js
Last active June 16, 2016 06:42
A simple React Flux implementation with Dependency Injection for Components created by a React Router createElement handler.
import React, { Component } from 'react';
export default class FluxDI {
static validateContextName(name){
if(typeof name !== 'string'){
throw new Error('`name` must be a string.');
}
}
@resistdesign
resistdesign / index.js
Created November 15, 2016 20:43
Collate Pages
function collate(pages = []){
const flats = [];
const { length } = pages;
const flatLength = Math.ceil(length/2);
const even = length % 2 === 0;
const newPages = [...pages];
if(!even){
const lastPage = newPages.pop();
@resistdesign
resistdesign / index.js
Last active December 9, 2016 03:57
JS DI Concept
// JSDI
class K{
handler;
constructor(handler){
this.handler = handler;
}
exec() {
@resistdesign
resistdesign / Example.js
Last active June 30, 2017 01:24
Universal Query Structure (UQS)
// Query
{
type: 'OR_SET',
data: [
{
type: 'AND_SET',
data: [
{
type: 'CONDITION',
fieldName: 'myField',
@resistdesign
resistdesign / SPO.md
Last active July 11, 2017 04:53
Standard Persistence Operations

Standard Persistence Operations

Driven by UTS

Bulk Operations (This may just be the right basis for all transactions here???)

Collection Management

  • Create Collection
  • typeName
@resistdesign
resistdesign / Example.js
Last active July 18, 2017 20:35
Universal Type Structure (UTS)
// Type Map
{
PrimitiveType: {
name: 'PrimitiveType',
label: 'Primitive Type',
primitive: true
},
AnotherType: {
name: 'AnotherType',
label: 'Another Type',