Skip to content

Instantly share code, notes, and snippets.

View moosh3's full-sized avatar
๐Ÿ
doing devop things

Alec Cunningham moosh3

๐Ÿ
doing devop things
View GitHub Profile
@eddywashere
eddywashere / App.js
Last active February 20, 2020 10:15 — forked from gaearon/App.js
Reactstrap App.js Example for create-react-app
import React, { Component } from 'react';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
Container,
@teknoraver
teknoraver / unixhttpc.go
Last active November 7, 2024 14:29
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@stjohnjohnson
stjohnjohnson / coverage.sh
Last active March 13, 2018 16:48
List of scripts to help automate publishing to NPM and Docker
#!/bin/bash -e
echo Uploading coverage to Coveralls
export CI_PULL_REQUEST=${SD_PULL_REQUEST}
export COVERALLS_SERVICE_NAME=screwdriver
cat ./artifacts/coverage/lcov.info | ./node_modules/.bin/coveralls
"""
Logical deletion for Django models. Uses is_void flag
to hide discarded items from queries. Overrides delete
methods to set flag and soft-delete instead of removing
rows from the database.
"""
from django.apps import apps
from django.contrib.admin.utils import NestedObjects
from django.db import models
from django.db.models import signals
@ndeloof
ndeloof / Jenkinsfile.groovy
Last active August 2, 2021 00:23
dockerNode without remoting
stage 'build' {
withDocker(image: 'node_js:4.4',
environment: [foo: 'bar'],
volumes: [node_cache: '/node_modules'],
commands: """
npm install
npm test
...
""",
@maksadbek
maksadbek / golang-linked-list.go
Created April 27, 2016 21:43
golang linked list implementation
package main
import "fmt"
type Node struct {
prev *Node
next *Node
key interface{}
}
import simplejson as json
import lxml
class objectJSONEncoder(json.JSONEncoder):
"""A specialized JSON encoder that can handle simple lxml objectify types
>>> from lxml import objectify
>>> obj = objectify.fromstring("<Book><price>1.50</price><author>W. Shakespeare</author></Book>")
>>> json.dumps(obj, cls=objectJSONEncoder)
'{"price": 1.5, "author": "W. Shakespeare"}'
"""
@ceremcem
ceremcem / Makefile
Last active October 23, 2017 21:06
oneshell testing
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS = -e
test:
cd /tmp
X=$(pwd)
echo "here is $$X"
@subfuzion
subfuzion / curl.md
Last active May 13, 2025 18:51
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@renshuki
renshuki / ubuntu_agnoster_install.md
Last active December 30, 2024 16:16
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH