Skip to content

Instantly share code, notes, and snippets.

# Usage: brag "thing you did"
#
# This creates/appends to a txt file in your ~/brags folder that you can use later on. It's tagged with the month.
function brag() {
export MSG="$1"
export BRAGFILE="$HOME/brags/brag_${USER}_$(date +%b).txt"
echo "* $MSG" >> "$BRAGFILE"
echo "Good job!"
}
# Usage: brag "thing you did"
#
# This creates/appends to a txt file in your ~/brags folder that you can use later on. It's tagged with the month.
function brag() {
export MSG="$1"
export BRAGFILE="$HOME/brags/brag_${USER}_$(date +%b).txt"
echo "* $MSG" >> "$BRAGFILE"
echo "Good job!"
}
@joemccall86
joemccall86 / linked_list.c
Created October 28, 2019 13:19
Linked List Tests
#include <stdio.h>
#include <microtime.h>
#include <string.h>
#include <stdlib.h>
struct ll_t {
float value;
struct ll_t *next;
};
#include <stdio.h>
#include <microtime.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int i, vector_size = 200000000;
float *vector1, *vector2;
double time1, time2;
import java.util.*;
class Fibonacci {
// Add cache for optimization
public static Map<Integer, Integer> cache = new HashMap<>();
public static void main(String[] args) {
// Print the fibonacci numbers from 0 to args[0]
System.out.println("Reading limit from argument = " + args[0]);
int limit = Integer.valueOf(args[0]);
-- Logs begin at Wed 2019-01-02 12:18:34 UTC, end at Wed 2019-01-02 12:24:08 UTC. --
Jan 02 12:18:47 minikube systemd[1]: Started kubelet: The Kubernetes Node Agent.
Jan 02 12:18:47 minikube kubelet[2674]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jan 02 12:18:47 minikube kubelet[2674]: Flag --pod-manifest-path has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jan 02 12:18:47 minikube kubelet[2674]: Flag --allow-privileged has been deprecated, will be removed in a future version
Jan 02 12:18:47 minikube kubelet[2674]: Flag --cluster-dns has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubern
@joemccall86
joemccall86 / ContextPathAwareInterceptor.groovy
Created November 16, 2016 18:05
Extended class for working around #10319
import grails.artefact.Interceptor
import groovy.transform.CompileStatic
import javax.servlet.http.HttpServletRequest
/**
* Workaround for https://github.com/grails/grails-core/issues/10319
*
* Allows an interceptor to behave properly when server.contextPath is set
*/
@joemccall86
joemccall86 / HockeySender.java
Last active March 14, 2016 17:54 — forked from ashtom/HockeySender.java
Custom ReportSender for HockeyApp and ACRA
package net.hockeyapp.android.demo;
public class HockeySender implements ReportSender {
public static final String TAG = "HockeySender";
private static String BASE_URL = "https://rink.hockeyapp.net/api/2/apps/";
private static String CRASHES_PATH = "/crashes";
@Override
public void send(Context context, CrashReportData errorContent) throws ReportSenderException {
@joemccall86
joemccall86 / Caddyfile
Last active March 6, 2016 14:23 — forked from edrex/Caddyfile
localhost
log access.log
proxy /echo 127.0.0.1:8080 {
websocket
# treat the path as if it were sent without the /echo
without /echo
}
@joemccall86
joemccall86 / gist:9943666
Created April 2, 2014 21:35
Stacktrace for failed grails unit test
| Loading Grails 2.2.4
| Configuring classpath
| Configuring classpath.
| Environment set to test
| Environment set to test.
| Environment set to test..
| Environment set to test...
| Environment set to test....
| Environment set to test.....
| Compiling 1 source files