Skip to content

Instantly share code, notes, and snippets.

Avatar

James Coleman ojame

View GitHub Profile
@ojame
ojame / processor.sh
Created Nov 26, 2019
Webflow to FTP/external host
View processor.sh
####
# -i the location of the zip file from webflow
# -u the username of the sftp user for wpengine
#
# example: ./webflow-processor.sh -i
####
while getopts "i:u:" OPTION
do
case $OPTION in
@ojame
ojame / delete.js
Created Jun 29, 2017
Delete all movies that haven't been 'downloaded' in Radarr. Mass/bulk deleting.
View delete.js
// Go to Radarr and click 'settings' => 'general'.
// Open the JavaScript Console in Google Chrome (View => Developer => Javascript Console)
// Past the following in. Hit enter and away you go.
const key = document.getElementsByClassName('x-api-key')[0].value;
if (!key) {
alert('Navigate to /settings/general and run again');
}
View chips-ahoy.js
var input = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d';
var result = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t';
function hexToPT(hex) {
var str = '';
for (var i = 0; i < hex.length; i += 2) {
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
}
View makelogobonkers.css
@media only screen and (min-width: 641px) {
#header #logoWrapper, #header #logoImage {
width: 100%;
max-width: 250px;
}
}
View heading.js
import React, {Component, PropTypes} from 'react';
import cx from 'classnames';
import styles from './wherever';
export default class Heading extends Component {
static propTypes = {
level: PropTypes.oneOf(1, 2, 3, 4, 5, 6).isRequired,
theme: PropTypes.oneOf('macropod', 'bugherd'),
};
View gist:fea4fc6b40df9a2a1d50
css:
.kitchen {
color: red;
text-decoration: none;
}
.kitchen :global(.blender) {
color: black;
font-weight: bold;
View some gif thing.js
function createGifPostToSlack(fs, request, createImageSizeStream, easyimg, GIFEncoder, pngFileStream, browserString, browserName) {
var imageWidth;
var imageHeight;
var screenshotsPath = 'tests/screenshots/'+browserName+'/';
var resultPath = screenshotsPath+'result.gif';
var resultPathCompressed = screenshotsPath+'result_compressed.gif';
var stream;
var makeGif = function() {
var encodeGif = function(width, height) {
View eg.html
<a href="index.html">
<h1>
<img src="images/logo.png" class="updatedlogo" alt="Jess Mundy - Personal Stylist" />
</h1>
</a>
View input-arrow.jsx
'use strict';
const React = require('react');
const InputWrapper = require('./input-wrapper');
const Widgets = require('react-widgets');
require('./input-tag.scss');
module.exports = React.createClass({
displayName: 'InputTag',