Skip to content

Instantly share code, notes, and snippets.

View 13122310958's full-sized avatar

eric 13122310958

View GitHub Profile
@benshimmin
benshimmin / gist:4443000
Created January 3, 2013 12:03
Stop Chrome popping up those "Confirm form resubmission" prompts when resubmitting POST data
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome -disable-prompt-on-repost &
@return1
return1 / bitcoin-cpuminer.sh
Last active July 8, 2024 19:21
install a bitcoin cpuminer on ubuntu/debian
# install dependencies
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
# clone cpuminer
git clone https://github.com/pooler/cpuminer.git
# compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
@soheilhy
soheilhy / nginxproxy.md
Last active October 23, 2024 08:19
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@catchthemes
catchthemes / woocommerce.css
Created September 22, 2014 14:06
Make the WooCommerce Cart Table Responsive for Mobile Devices
/* START Make the WooCommerce Cart Table Responsive for Mobile */
/* CSS published in http://www.jeremycarter.com.au/optimising-woocommerce-checkout-for-mobile/ */
@media screen and (max-width: 600px) {
/* Force table to not be like tables anymore */
.woocommerce-page table.shop_table,
.woocommerce-page table.shop_table thead,
.woocommerce-page table.shop_table tbody,
.woocommerce-page table.shop_table th,
@menski
menski / MyTestScript.groovy
Created October 6, 2014 21:29
Deploy BPMN process with external script resource via REST API on heroku
println "Hello world"
execution.setVariable("groovy", "works")
@seanmcn
seanmcn / gist:62a021a765ad4f8e593b
Last active July 20, 2024 16:30
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@anamorph
anamorph / HOWTO Install Cacti on AWS EC2 Instance running Amazon Linux.md
Last active September 6, 2022 00:49
HOWTO Install Cacti on AWS EC2 Instance running Amazon Linux

0. First install the pre-reqs

0.1 Installing

yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd -y

0.2 Configuring services

chkconfig mysqld on
chkconfig httpd on
service mysqld start
service httpd start
@3dd13
3dd13 / controllers.js
Created June 15, 2015 12:33
Testing ngCordova geolocation watchPosition and getCurrentPosition function
.controller('DashCtrl', function($scope, $ionicPlatform, $cordovaGeolocation) {
var watch;
var watchOptions = {
timeout : 5000,
maximumAge: 3000,
enableHighAccuracy: true // may cause errors if true
};
var pollCurrentLocation = function() {
$cordovaGeolocation.getCurrentPosition(watchOptions)
@marcinwol
marcinwol / compile_monero.sh
Created August 16, 2015 01:19
Ubuntu 14:04: compile CPUMiner/minerd (forked by LucasJones & Wolf) for Monero mining
# get git to install it
sudo apt-get install git
# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev
# download latest version
git clone https://github.com/wolf9466/cpuminer-multi
cd cpuminer-multi/
@typcn
typcn / live_number.py
Created August 25, 2015 12:29 — forked from cnbeining/live_number.py
A simple script to get lots of viewers of Bilibili Live - PLUS
#!/usr/bin/env python
#coding:utf-8
# Author: Beining --<cnbeining#gmail.com>
# Author: TYPCN --<typcncom#gmail.com> ( Performance improve and fix )
# Purpose: A simple script to get lots of viewers of Bilibili Live
# Created: 08/11/2015
# Error report: http://www.cnbeining.com/?p=952
# https://github.com/cnbeining somewhere within my gists
import sys