Skip to content

Instantly share code, notes, and snippets.

View josealvarez97's full-sized avatar
Playing soccer

José Alvarez C. josealvarez97

Playing soccer
  • San Francisco, California
View GitHub Profile
@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 4, 2024 09:16
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@varyonic
varyonic / Dockerfile
Created June 10, 2016 14:14
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active April 15, 2024 14:27
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request:
@darktable
darktable / SavWav.cs
Created April 6, 2012 05:01
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@diorahman
diorahman / client.html
Created December 26, 2011 03:34
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');
@matthewjberger
matthewjberger / notes.md
Last active March 11, 2024 10:21
How to make an electron app using Create-React-App and Electron with Electron-Builder.
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@GuilleUCM
GuilleUCM / ObjectShake.cs
Last active August 7, 2023 18:34
Unity:Animation:Shake object vibrate
using UnityEngine;
using System.Collections;
/// http://www.mikedoesweb.com/2012/camera-shake-in-unity/
public class ObjectShake : MonoBehaviour {
private Vector3 originPosition;
private Quaternion originRotation;
public float shake_decay = 0.002f;
@wrossmck
wrossmck / makeOSXiso.sh
Created November 18, 2015 11:10
Convert Downloaded El Capitan.app to bootable iso
#!/bin/bash
#taken from http://www.insanelymac.com/forum/topic/308533-how-to-create-a-bootable-el-capitan-iso-fo-vmware/
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Create the ElCapitan Blank ISO Image of 7316mb with a Single Partition - Apple Partition Map
hdiutil create -o /tmp/ElCapitan.cdr -size 7316m -layout SPUD -fs HFS+J
Spring 2019
*****INSTRUCTIONS*****
(1) Debugging--in the 3 cases below (a through c), identify the major coding error in each case and explain how to fix it, in 1-2
sentences. DO NOT actually copy/paste corrected code:
(a) https://gist.github.com/diamonaj/2e5d5ba5226b7b9760f5d1bf1e7bf765
(b) https://gist.github.com/diamonaj/3b6bc83d040098486634184d99fc4c55