This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# permanent apple keyboard keyswap | |
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf | |
update-initramfs -u -k all | |
# Temporary & instant apple keyboard keyswap | |
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd | |
# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super) | |
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: python:2.7 | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install google-cloud-sdk | |
after_script: | |
- rm /tmp/$CI_PIPELINE_ID.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
var urls = []string{ | |
"http://pulsoconf.co/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config_dict = { | |
'group1': { | |
'server1': { | |
'apps': ('nginx', 'mysql'), | |
'cpus': 4 | |
}, | |
'maintenance': True | |
}, | |
'firewall_version': '1.2.3', | |
'python2.7': True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp') | |
var shell = require('gulp-shell') | |
gulp.task('build-docs', shell.task('make html', {cwd: './docs'})) | |
gulp.task('docs', ['build-docs'], function() { | |
gulp.watch(['./docs/*.rst', './docs/*.py'], ['build-docs']) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exercise: Nutrition Facts | |
Create an empty webpage. | |
Download nutrition.xml from https://gist.github.com/3000322 and place in your project folder. | |
Use AJAX via jQuery or JS API to fetch the file into the page. | |
Create a table. For each <food> in the XML file, create a row in the table with the food name and nutritional facts - serving size, calories, carbs. | |
Bonus: Use the tablesorter jQuery plugin to make the table sortable by the nutritional facts. | |
Exercise: Lady Gaga News |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is an EXAMPLE gulpfile.js | |
You'll want to change it to match your project. | |
Find plugins at https://npmjs.org/browse/keyword/gulpplugin | |
*/ | |
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
gulp.task('scripts', function() { | |
// Minify and copy all JavaScript (except vendor scripts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Credit to Adam Presley, who's ftpsyncing fabfile I used as a starting point | |
http://adampresley.com/#!post/2013/04/how-i-deployed-a-php-app-via-ftp-using-fabric-and-git | |
''' | |
import fabric | |
import ftplib | |
import re | |
import os | |
from git import * | |
from ftplib import FTP |
NewerOlder