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
# Find a *lot* of files with the wrong extension and fix the extension. | |
for myfile in $(find /var/www/releases/sanfranciscocode/*/production/current/htdocs/downloads/current/code-text -name "*..txt" -type f); do | |
filetrim=${myfile%????}; | |
mv $myfile $filetrim"txt"; | |
done; |
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
# Put this at the end of your .bash_profile. | |
# | |
# Usage: clearsolr corename | |
clearsolr() { | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<delete><query>*:*</query></delete>' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<commit />' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<optimize />' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<commit />' | |
} |
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 etherpad_client = require('etherpad-lite-client'); | |
module.exports = { | |
/** | |
* list() - list all docs | |
*/ | |
list: function(req, res) { | |
etherpad_api = etherpad_client.connect({ | |
apikey: sails.config.connections.etherpad.apikey, | |
host: sails.config.connections.etherpad.host, |
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
define(['squire'], function (Squire) { | |
"use strict"; | |
describe("DashboardIndexController", function () { | |
var context = {}; | |
var ready = false; | |
beforeEach(function () { | |
runs(function () { | |
context.injector = new Squire(); |
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
mysql> desc testdates; | |
+-------+----------------------+------+-----+---------+----------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+-------+----------------------+------+-----+---------+----------------+ | |
| id | int(10) unsigned | NO | PRI | NULL | auto_increment | | |
| year | smallint(5) unsigned | YES | | NULL | | | |
| month | tinyint(3) unsigned | YES | | NULL | | | |
| day | tinyint(3) unsigned | YES | | NULL | | | |
+-------+----------------------+------+-----+---------+----------------+ |
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
#!/bin/bash | |
# | |
# solr APACHE SOLR 4.10 | |
# | |
# chkconfig: 2345 85 15 | |
# description: Startup Script for APACHE SOLR 4.10 | |
# | |
# processname: solr | |
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
/** | |
* Example of php code using Wordpress' login. | |
*/ | |
require_once '../pages/wp-blog-header.php'; | |
// If the user is not authorized, redirect to the Wordpress login. | |
auth_redirect(); | |
// Your code here |
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
function MM_reloadPage(init) { //reloads the window if Nav4 resized | |
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { | |
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} | |
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); | |
} | |
MM_reloadPage(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
"You hammer away like a parrot at one word, freedom, freedom; but what is the sense of it? If you attained your freedom, what do you imagine would happen? In the philosophic sense, a bottomless void, and in actual life you would become an idler, a parasite. If you were free in your sense, what would bind you to life or to people? Now, birds are free, but still they build nests; you, however, wouldn't even build a nest, but would gratify your sexual feeling anywhere, like a dog. You think seriously, and you will come to see, you will come to feel, that this freedom is ultimately emptiness, boundlessness... Christ was free and so was Buddha, and both took on themselves the sins of the world and voluntarily entered the prison of earthly life. Further than that nobody has gone, nobody. And you—we—well, what's the good of talking—we are all looking for freedom from obligations towards our fellow men, whereas it is just that feeling of our obligations which has made us men, and, if those obligations were not there, |
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
/* | |
NOTE: There's some magic going on in .cols() to add a negative right margin. | |
This resolves the the inline-block issue for uncompressed html. However, | |
it shouldn't be here - you should minify your html instead. This will | |
be removed in the immediate future. | |
This is the core framework for the site. | |
It implements the baseline LESS CSS Mixins and general style rules. |