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
スミス:おはようございます。 | |
ニコラス:おはようございます。 | |
スミス:どうぞおはいりください。 | |
ニコラス:しつれいします。 | |
スミス:どうぞこちらえ。 | |
スミス:車できましたか。 | |
ニコラス:いいえ、着てんしゃで行きました。 | |
スミス:ああ、そうですか。 | |
スミス:どうぞおかけください。 | |
ニコラス:どうもありがとう。 |
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
var Beacon = Backbone.Model.extend({ | |
defaults: { | |
name: String | |
} | |
}); | |
var Beacons = Backbone.Collection.extends({ | |
model: Beacon, | |
url: '/beacons' | |
}); |
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
# Search for a string in files | |
grep -r "findme" . | |
# List processes filtered by a string | |
ps -aux | grep httpd |
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
var pages = [ | |
{id: 1, parent: null, name: 'First'}, | |
{id: 2, parent: null, name: 'Second'}, | |
{id: 3, parent: 2, name: 'First child of second'}, | |
{id: 4, parent: 2, name: 'Second child of second'}, | |
{id: 5, parent: 2}, | |
{id: 6, parent: 4}, | |
{id: 7, parent: 4}, | |
{id: 8, parent: 6} | |
]; |
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
[ | |
{ | |
"$match": { | |
"tags": { | |
"$in": [ | |
"android", | |
"apple" | |
] | |
} | |
} |
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
# Fetch all the branches and their commits from the repo | |
git fetch origin | |
# Just fetch the branches from the repo | |
git fetch -p | |
# Display the remote branches | |
git branch -r | |
# Setting a local branch remote to the one on the origin |
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
<?php | |
$GLOBALS['__DB'] = false; | |
function collection($name = FALSE) | |
{ | |
if (!$GLOBALS['__DB']) | |
{ | |
$connection = new MongoClient("http://localhost:27017"); | |
$dbname = "database_name"; |
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
Layer = | |
getCollections: (callback) -> | |
collections = db.extractCollections() | |
return callback(collections) if collections.length | |
API.getCollections | |
success: (data) -> | |
collections = db.saveAndGetCollections data |
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
namespace HipChatter.Libs | |
{ | |
public sealed class API | |
{ | |
private static readonly API instance = new API(); | |
public ObservableCollection<Contact> Contacts = new ObservableCollection<Contact>(); | |
public ObservableCollection<Room> Rooms = new ObservableCollection<Room>(); | |
public ObservableCollection<Chat> Chats = new ObservableCollection<Chat>(); | |
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
window.onscroll = function() { | |
var top = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; | |
console.log(top); | |
} |