Skip to content

Instantly share code, notes, and snippets.

@larvel
larvel / migrateserver.sh
Created September 24, 2018 19:34
Script to copy production server to test server
#!/bin/bash
USER=user
MYSQLPASSWORD=password
MYSQL="/usr/bin/mysql"
MYSQLDUMP="mysqldump --max_allowed_packet=800M"
TESTSERVER=mynewserver.mydomain.com
FOLDER=/usr/local/atlassian/
EXCLUDE="--exclude *.pid --exclude backup/*.zip --exclude atlassian-confluence.log* --exclude catalina.*.log --exclude localhost.*.log --exclude updateTestServer.sh* --exclude daily-backup-* --exclude backup-*.zip --exclude atlassian-jira.log.* --exclude catalina.out --exclude *confluencedata/index* --exclude *confluencedata/backups/* --exclude *prosjektwiki/confluencedata/backups/* --exclude *old/"
@bookjan
bookjan / face-detection.py
Last active January 18, 2022 08:02
Using python opencv to detect face and send the frames to FFmpeg to create HLS(HTTP Live Streaming)
import numpy as np
import cv2
import sys
cap = cv2.VideoCapture(0)
face_cascade = cv2.CascadeClassifier('<PATH_TO_CASCADES_FOLDER>/haarcascade_frontalface_default.xml')
while(True):
# Capture frame-by-frame
@HarryUPf
HarryUPf / README.md
Last active September 28, 2023 01:37
Raspberry Pi SunVox Headless Synth (in 10 easy steps)

Raspberry Pi SunVox Headless Synth Setup (in 10-easy-steps)

INSTRUCTIONS

STEP_01

STEP_02

  • write the extracted .img to sdcard with Etcher

STEP_03

@davisokoth
davisokoth / autopgsqlbackup
Created May 30, 2018 19:52 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@nadavrot
nadavrot / Matrix.md
Last active April 2, 2024 06:45
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active March 13, 2024 07:27
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@mxactvtd
mxactvtd / TidalCyclesQuickReferenceStub.tidal
Last active March 8, 2024 21:19
TidalCycles Quick Reference compiled and partially rewritten documentation from various sources
---- TidalCycles QUICK REFERENCE ----
----------------------------------------------------------------
-- To use in your editor after or alongside your code for quick reference
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions
-- designed with atom - monokai one dark vivid as theme
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm
----------------------------------------------------------------
-- Some sources of Documentation --
-- https://tidalcycles.org/patterns.html
-- https://tidalcycles.org/functions.html
@mvanga
mvanga / highres.pde
Last active April 6, 2023 22:32
A skeleton Processing sketch that allows for exporting high-resolution versions of whatever is on screen.
import processing.pdf.*;
/*
* A complete tutorial can be found over at:
* http://sighack.com/post/exporting-high-resolution-images-in-processing
*/
int seed;
int CONFIG_SCALE_FACTOR = 5;
@rbnpi
rbnpi / index.html
Created October 22, 2017 13:15
TouchOSC layout for Sonic Pi 2 note generator
<?xml version="1.0" encoding="UTF-8"?><layout version="15" mode="0" orientation="vertical"><tabpage name="bm90ZWdlbg==" scalef="0.0" scalet="1.0" ><control name="a2lsbA==" x="121" y="223" w="30" h="30" color="red" scalef="0.0" scalet="1.0" type="push" local_off="false" ></control><control name="bm90ZTE=" x="6" y="125" w="263" h="50" color="red" scalef="-1.0" scalet="1.0" type="faderh" response="absolute" inverted="false" centered="true" ></control><control name="bm90ZTI=" x="8" y="299" w="258" h="50" color="red" scalef="-1.0" scalet="1.0" type="faderh" response="absolute" inverted="false" centered="true" ></control><control name="c3RhcnQ=" x="199" y="223" w="30" h="30" color="green" scalef="0.0" scalet="1.0" type="push" local_off="false" ></control><control name="cmFuZ2U=" x="37" y="33" w="200" h="50" color="purple" scalef="0.0" scalet="1.0" type="multitoggle" number_x="5" number_y="1" ex_mode="true" local_off="false" ></control><control name="cmVzZXQ=" x="42" y="222" w="34" h="31" color="yellow" scalef="0.0"
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 14, 2024 20:30 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update