Skip to content

Instantly share code, notes, and snippets.

View chrisarusso's full-sized avatar

Chris Russo chrisarusso

View GitHub Profile
@chrisarusso
chrisarusso / cloc output on 8.1.x branch
Created May 8, 2016 13:08
Lines of code of Drupal 8.1.x.
CAR-computer:drupal chris$ git branch
6.x
7.x
8.0.x
8.1.0
* 8.1.x
CAR-computer:drupal chris$ cloc .
9729 text files.
9522 unique files.
667 files ignored.
@chrisarusso
chrisarusso / gist:91b4980ba2a46eae1420
Created September 25, 2015 16:20
Failed bunzipping
www@savasdev:~$ bunzip2 today.sql.bz2
bunzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bunzip2: No such file or directory
Input file = today.sql.bz2, output file = today.sql
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
Freeing unused kernel memory: 1428K (ffffffff81f35000 - ffffffff8209a000)
Write protecting the kernel read-only data: 14336k
Freeing unused kernel memory: 600K (ffff88000196a000 - ffff880001a00000)
Freeing unused kernel memory: 32K (ffff880001df8000 - ffff880001e00000)
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
MacBook-Pro:durhamatletico.github.io chris$ pip install csvkit --user
You are using pip version 7.0.3, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting csvkit
Downloading csvkit-0.9.1.tar.gz
Collecting xlrd>=0.7.1 (from csvkit)
Downloading xlrd-0.9.4.tar.gz (322kB)
100% |████████████████████████████████| 323kB 215kB/s
Collecting sqlalchemy>=0.6.6 (from csvkit)
Downloading SQLAlchemy-1.0.8.tar.gz (4.6MB)
MacBook-Pro:durhamatletico.github.io chris$ _scripts/build.sh
_scripts/build.sh: line 5: csvgrep: command not found
_scripts/build.sh: line 5: csv2json: command not found
_scripts/build.sh: line 7: csvgrep: command not found
_scripts/build.sh: line 7: csv2json: command not found
_scripts/build.sh: line 9: csvgrep: command not found
_scripts/build.sh: line 9: csv2json: command not found
_scripts/build.sh: line 11: csvgrep: command not found
_scripts/build.sh: line 11: csv2json: command not found
Traceback (most recent call last):
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="leaflet-providers.js"></script>
</head>
<body>
<div id="map" style="width: 100%; height: 300px;"></div>
<script type="text/javascript">
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxcD34AvOB4E0wjeD8eUV3gmAkvLhII83YamJa/AGDOTAmnCRrxw/ZFJIYfZX+UHddJ5HEMT+fMj1s3Oh4oppO/1Eluaxl5k+UlW+QYyt1T642hruRxgGuIhN6E0PhZ1mM9veaied9PDhCAD3WSsEXaKuarkvYxEVYb3oPYN18KWzRYq3r6VWdoy8ZHm8pxKSB/wH9TkglQEEWNLaelylwyh5k4hXkEwf0OhALpfXgWFjvSqjDqKh9GplTSfM/FU29Bb6rZDflwFaOAu9EjDfFKrfb4KxZQNAUijXacuniOmVfh7+97GR/9U58IeC0szg+6HNpaalY3HR6mdYkKSapw== chris@chris-laptop
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz2CitZuFHxo6pgYNTIgxwaKQqOAVdd4emwtOqbNt6OA/di/6+zQ5KdojtAFp3D3jomXOkM6rlHCVYnDtZcjIorwx5Ls0qJPZ2PVVZOdoVmd2qZz54RsUGPRGWIPzzI0xGgmjNJdvP8uWrFzoMAIPY+SSCgIXFEip+Ki532vkq3KenHcsoXC9ymg7bhMUbLb4mVthxGh8RxdLAK4sKeEaayZgbeDRmfObhq1d/mfccoudenWL2vpLWG5UgcBJdZwkcaFUUQhmSL8prWsKSoV+TQ8+G511HUeoRGNlV0ZAndJt6pi3nJ7Ft5/TI/6ySvhAnOWvvmfcwDyntwTiDuhGD kosta@designhammer.com
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDR6LTMDPlImct6GtNf4pX0lb9JrwJ0Y9/5leOi1DkO6J4h5dAMRZbG92wE2HNBxNX7z10MGMKZvHB6U/L6UjTF3Wyn73BQVc8LiMxVXKoxail5nMYJASHBuoU3m3m8stAWIGhtoDSth7k9ym6WMY/IySOhyvBnOcS27SH8TVXI2nWf9FDl65
drush sql-dump --result-file
`drush sql-connect` < /whatever_the_result_file_is.sql
root@li117-183:/home/deploy/escp/prod/drupalroot# drush sql-connect
mysql --database=prod_compostpedallers_com --host=localhost --user=prod_user --password='t33p33b3mad!'
root@li117-183:/home/deploy/escp/prod/drupalroot# mysql --database=prod_compostpedallers_com --host=localhost --user=prod_user --password='t33p33b3mad!' < wgatevsf.sl^C
rsync files from prod to dev. remove the -n to allow it to actually happen
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'cognet',
'username' => '',
'password' => '',
<?php
$db_url = 'mysql://root@localhost/mitpress';
ini_set('memory_limit', '256M');
$conf['preprocess_css'] = $conf['preprocess_js'] = 0;