Skip to content

Instantly share code, notes, and snippets.

@ahmadsoe
ahmadsoe / .maintenance
Created August 26, 2021 20:22
WordPress maintenance mode
<?php
$upgrading = time();
@ahmadsoe
ahmadsoe / gist:99bb58b28356a1c1627d29c503982abd
Created April 1, 2020 04:24
Force download pdf with .htaccess
<FilesMatch "\.(?i:pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>

Keybase proof

I hereby claim:

  • I am ahmadsoe on github.
  • I am ahmadsoe (https://keybase.io/ahmadsoe) on keybase.
  • I have a public key whose fingerprint is DD20 1BAB FECA 117D 845A 097E 53E2 141A 1CDE C674

To claim this, I am signing this object:

@ahmadsoe
ahmadsoe / add_user.md
Last active June 10, 2017 21:45
add user ubuntu
# adduser <username>
# usermod -aG sudo <username>
@ahmadsoe
ahmadsoe / README.md
Last active February 12, 2024 07:24 — forked from rishubil/README.md
VPNGate Python script

#VPNGate for OS X This script is a simple script for using to connect vpn server list provided VPNGate through OpenVPN on OS X environment.

It inspired by VPNGate Python script wrtten by Andrea Lazzarotto.

##Requirements If you use the script, Tunnelblick needs to be installed first.

##Installation Open terminal app and copy & paste the command below.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
#include <random.h>
#include <object.h>
#include <route.h>
#include <packet.h>
#include <cmu-trace.h>
#include "zrp.h"
#if defined(WIN32) && !defined(snprintf)
#define snprintf _snprintf
install ns2
$cd ~
$wget http://downloads.sourceforge.net/project/nsnam/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz
$wget https://www.dropbox.com/s/cngpdd38hx49p49/zrp-ns235.patch
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install tcl8.5-dev tk8.5-dev
$sudo apt-get install build-essential autoconf automake
$sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev
@ahmadsoe
ahmadsoe / spotify.js
Created September 23, 2014 09:37
spotify starred
// npm install 1994rstefan/node-spotify-web
var Spotify = require('spotify-web');
// Spotify credentials...
var username = process.argv[2];
var password = process.argv[3];
// console.log("username:"+username);
// console.log("pass:" + password);
#! /bin/bash
# Acknowledgements
# I forked this code from Chris Fidao see: https://gist.github.com/fideloper
# May need to run this as sudo!
# I have it in /usr/local/bin and run command 'vhost' from anywhere, using sudo.
NORMAL=$(tput sgr0)
GREEN=$(tput setaf 2; tput bold)