Skip to content

Instantly share code, notes, and snippets.

View manuelcoppotelli's full-sized avatar
👨‍💻

Manuel Coppotelli manuelcoppotelli

👨‍💻
View GitHub Profile
@oskarhagberg
oskarhagberg / Current Song.scpt
Created December 5, 2009 07:27
AppleScript to show current playing iTunes song using Growl notification
-- Register with Growl
tell application "GrowlHelperApp"
-- The notification types
set the allNotificationsList to {"Current Song"}
set the enabledNotificationList to allNotificationsList
-- Register script with growl
register as application ¬
"iTunes Current Song AppleScript" all notifications allNotificationsList ¬
default notifications enabledNotificationList ¬
@pksunkara
pksunkara / config
Last active July 21, 2024 22:19
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@mdesantis
mdesantis / .Xmodmap
Created November 26, 2011 17:58
Solving swapped keys ( <> key is wapped with \| key ) of the italian Apple Keyboard on Ubuntu (from the thread http://forum.ubuntu-it.org/index.php/topic,383892.msg3872344.html )
! Direttive per mappare correttamente la tastiera Apple italiana su Ubuntu,
! cioè, correggere lo scambio dei tasti maggiore/minore con quello di backslash/pipe
!
! 49: codice del tasto maggiore/minore ( <> ) (situato a destra del tasto L-SHIFT)
! 94: codice del tasto backslash/pipe ( \| ) (collocato a sinistra del tasto `uno/punto esclamativo` ( 1! ) )
!
!
! I comandi scritti sotto, eseguiti da terminale sono:
! xmodmap -e "keycode 49 = less greater guillemotleft guillemotright guillemotleft guillemotright" && \
! xmodmap -e "keycode 94 = backslash bar notsign brokenbar notsign brokenbar"
@rduplain
rduplain / app.py
Created January 19, 2012 17:28
Plot a PNG using matplotlib in a web request, using Flask.
"Plot a PNG using matplotlib in a web request, using Flask."
# Install dependencies, preferably in a virtualenv:
#
# pip install flask matplotlib
#
# Run the development server:
#
# python app.py
#
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@adamwathan
adamwathan / laravel-cors.php
Last active September 16, 2022 00:16
Need to do something like this to serve APIs that are going to be consumed by JS clients.
<?php
App::before(function($request) {
if ($request->getMethod() == 'OPTIONS') {
$response = Response::make('', 204);
$response->header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS');
$response->header('Access-Control-Allow-Origin', '*');
$response->header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization');
return $response;
}
@petemcw
petemcw / 01-README.md
Last active February 2, 2024 11:50
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@denji
denji / README.md
Last active April 26, 2024 18:09 — forked from istepanov/gist:3950977
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
@imjakechapman
imjakechapman / gulpfile.js
Created May 23, 2014 00:08
Base Gulpfile
// Ah, Big Gulp's eh? Welp, see ya later.
var gulp = require('gulp'),
gutil = require('gulp-util'),
c = require('chalk'),
clean = require('gulp-clean'),
imagemin = require('gulp-imagemin'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
map = require('map-stream'),