Skip to content

Instantly share code, notes, and snippets.

@dy-dx
dy-dx / thayer.itermcolors
Created September 10, 2020 23:14
This used to be at (https://github.com/baskerville/iTerm-2-Color-Themes/) but that's gone so here it is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.11764705926179886</real>
<key>Green Component</key>
<real>0.11372549086809158</real>
@dy-dx
dy-dx / selectNgons.mel
Last active June 26, 2021 07:31
Maya script that selects all visible non-quad faces in the scene.
{
// Make sure we're in object mode, otherwise some currently selected faces can mess this up.
// Need to switch on component mode first to make this work in all cases.
changeSelectMode -component;
changeSelectMode -object;
// Select all face components
select -r `listTransforms "-type mesh -visible"`;
PolySelectConvert 1;
let blacklists = ["*://localhost/*","*://mail.google.com/*","*://meet.google.com/*","*://www.youtube.com/*","*://dy-dx.com/*"]
iunmapAll
unmap ? : /
unmap h j k l 0 $
unmap a i I r y b B p P x X t T O H S L D n N v V
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline." at /home/app/kiwi2-api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115' 'exception:{"class":"Doctrine\\DBAL\\Exception\\DriverException","message":"An exception occurred while executing "UPDATE user_character_power_reversal_term SET reversal_special = ?, reversal_ex = ?, reversal_ca = ?, reversal_vskill = ?, reversal_vtrigger = ?, reversal_all = ?, corner_normal = ?, corner_throw = ?, corner_command = ?, corner_special = ?, corner_ex = ?, corner_ca = ?, corner_vskill = ?, corner_vtrigger = ?, corner_vreversal = ?, corner_all = ?, updated_at = ? WHERE user_id = ? AND character_id = ? AND opponent_character_id = ?" with params [\"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@dy-dx
dy-dx / git-pull-all.sh
Created March 13, 2019 15:45
run git pull in all repos, unless the branch is something other than "dev" or "master"
#!/bin/bash
RED="\033[0;31m"
YELLOW="\033[0;33m"
GREEN="\033[0;32m"
NO_COLOR="\033[0m"
function defaultBranch() {
git remote show origin | grep "HEAD branch" | sed 's/.*: //'
}
@dy-dx
dy-dx / sans-video-speedup.user.js
Created March 14, 2018 20:46
Tampermonkey script for SANS training videos - Change playback rate to 1.5x
// ==UserScript==
// @name SANS training videos - Change playback rate to 1.5x
// @version 0.1
// @match https://cc.sans.org/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
if (window.videojs) {
@dy-dx
dy-dx / zipserver.js
Created October 5, 2017 23:07
async download bundler
const http = require('http');
const archiver = require('archiver');
const request = require('request');
const urls = [
'http://www.colorado.edu/conflict/peace/download/peace.zip',
'http://www.colorado.edu/conflict/peace/download/peace_essay.ZIP',
'http://www.colorado.edu/conflict/peace/download/peace_example.ZIP',
];
@dy-dx
dy-dx / 32.asm
Created June 26, 2017 23:14 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
import React, { Component, PropTypes } from 'react';
export default function fuck(WrappedComponent) {
return class FuckedComponent extends Component {
constructor(...args) {
super(...args);
this.state = {};
}
@dy-dx
dy-dx / kubedns-deployment.yaml
Last active October 6, 2016 19:32
kubedns add-on
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,