This file contains hidden or 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
#!/bin/bash | |
set -e | |
# Display an introduction message | |
echo "Welcome to the Arch Linux installation script!" | |
echo "Please follow the instructions carefully." | |
# Determine the first wireless interface | |
wireless_interface=$(ip link | grep -E '^[0-9]+: w' | awk '{print substr($2, 1, length($2)-1)}') |
This file contains hidden or 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
import pyodbc | |
import sys | |
import csv | |
conn = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\the\path\to\the.accdb;') | |
cursor = conn.cursor() | |
def output_col(col): | |
if col: | |
if isinstance(col, unicode): |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = 'parallel_assets_compiler' | |
s.version = '0.2.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jørgen Orehøj Erichsen' | |
s.email = 'joe@erichsen.net' | |
s.summary = 'Compile assets in parallel' | |
s.description = 'Compile assets in parallel to speed up deployment' |
This file contains hidden or 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
# locales/en.yml | |
en: | |
time: | |
formats: | |
ical: "%Y%m%dT%H%M%SZ" |
This file contains hidden or 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
# added | |
gem 'activemerchant' |
This file contains hidden or 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
SELECT 1 FROM `models` WHERE | |
(`models`.`id` = BINARY 'd178546e-39bc-11e2-8b8b-40406f66ce3e' | |
AND `models`.`id` != 'd178546e-39bc-11e2-8b8b-40406f66ce3e') LIMIT 1 |
This file contains hidden or 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
[ | |
{ | |
"user_id": "105324781372784188083", | |
"email": "carmine.moleti@gmail.com", | |
"verified_email": true, | |
"name": "Carmine Moleti", | |
"given_name": "Carmine", | |
"family_name": "Moleti", | |
"link": "https://plus.google.com/105324781372784188083", | |
"picture": "https://lh6.googleusercontent.com/-IqhctvRS11k/AAAAAAAAAAI/AAAAAAAAATE/emxQvFOrhXk/photo.jpg", |
This file contains hidden or 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
ul { | |
list-style: disc; | |
margin: 10px; | |
padding-left: 10px; | |
} |
This file contains hidden or 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
# You can use this class in your console. For example | |
# p = ProfilingTools.new | |
# p.profiled_request(:controller => :welcome, :action => :index) | |
# this will profile whole application stack and save file in your tmp/profiler folder | |
# You can also use +request+ method just to see the output for example: | |
# | |
# p.request(:controller => :offers, :action => :index) | |
# | |
# p.response.body | |
# p.response.cookies # and so on |
This file contains hidden or 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
for(i in unique(mcg$runid)) { | |
png(paste("plots/greater_than_5_meters/",sprintf("%02d",i),".png",sep=""), width=1024, height=768) | |
df2 <- mcg[mcg$runid == i & mcg$distance > 5,] # remove the second condition for the "all" plots | |
plot(df2$lon.y, df2$lat.y, cex=0.1) | |
lines(c(df2$lon.x,df2$lon.y),c(df2$lat.x,df2$lat.y),col=1 + df2$runid %% 31) | |
title(main=paste("RUN", i), col.main=1+i%%31, font.main=3) | |
dev.off() | |
} | |
NewerOlder