Skip to content

Instantly share code, notes, and snippets.

View cmmarslender's full-sized avatar

Chris Marslender cmmarslender

  • Chia Network Inc.
  • Minneapolis/St. Paul
View GitHub Profile
@wallentx
wallentx / pet-cats
Last active February 17, 2023 23:48
Automatically name your Chia UNKNOWN CATs
#!/usr/bin/env bash
set -e
FINGERPRINT=$1
source ~/chia-blockchain/activate
treat() {
curl -s -X 'GET' \
-H 'accept: application/json' \
func RCTLogError(_ message: String, _ file: String=#file, _ line: UInt=#line) {
RCTSwiftLog.error(message, file: file, line: line)
}
func RCTLogWarn(_ message: String, _ file: String=#file, _ line: UInt=#line) {
RCTSwiftLog.warn(message, file: file, line: line)
}
func RCTLogInfo(_ message: String, _ file: String=#file, _ line: UInt=#line) {
@tlovett1
tlovett1 / git-author-audit.php
Created November 2, 2017 20:40
Print out code that an author has contributed to a Git repo filtering out whitespace and compiled files.
#!/usr/bin/env php
<?php
if ( empty( $argv[1] ) ) {
exit( "Need to supply an author.\n" );
}
$author = $argv[1];
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 6, 2024 13:53
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@teknoraver
teknoraver / unixhttpc.go
Last active March 21, 2024 11:48
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@mhubig
mhubig / Dockerfile
Last active November 3, 2023 03:42
Alpine Linux based cronjob runner
FROM alpine:latest
RUN apk add --update php python py-pip mysql-client \
&& pip install awscli \
&& rm -rf /var/cache/apk/*
RUN touch crontab.tmp \
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \
&& crontab crontab.tmp \
@byrnedo
byrnedo / check_docker_newer_tag.sh
Created April 7, 2016 07:08
Check if newer docker image available.
#!/bin/bash
# ensure running bash
if ! [ -n "$BASH_VERSION" ];then
echo "this is not bash, calling self with bash....";
SCRIPT=$(readlink -f "$0")
/bin/bash $SCRIPT
exit;
fi
@postmodern
postmodern / rip_dvd
Last active January 1, 2024 00:22
Script to automate ripping DVDs using Handbrake-CLI and mkvmerge
#!/usr/bin/env bash
#
# Author: postmodern
# Description:
# Rips a DVD to a H.264 MKV file, with chapters and tags. Ignores any
# bad blocks or sectors on the DVD.
# Dependencies:
# * gddrescue
# * handbrake-cli
# * mkvtoolnix
@sameersbn
sameersbn / gitlab.conf
Created February 6, 2015 09:53
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;
@trepmal
trepmal / gist:1c66dbe97e8f322bc107
Created December 19, 2014 22:42
wp-cli: reset all user passwords
#!/bin/bash
for uid in $(wp user list --field=ID)
do
pass=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}`
wp user update $uid --user_pass="$pass"
done