The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
#!/usr/bin/env python3 | |
import os, sys | |
import xmlrpc.client | |
rpc_key = '...' # replace with your RPC Key from http://upcdatabase.com/user | |
server = xmlrpc.client.ServerProxy('http://www.upcdatabase.com/xmlrpc') | |
lookup_keys = {12: 'upc', 13: 'ean'} |
const GLib = imports.gi.GLib; | |
const Gio = imports.gi.Gio; | |
let [res, out, err, status] = GLib.spawn_command_line_sync('ls -la'); | |
print(out); | |
let [res, out] = GLib.spawn_command_line_sync('ls -la'); | |
print(out); | |
let [res, out] = GLib.spawn_sync(null, ['/bin/ls', '-la'], null, 0, null); |
#!/usr/bin/gjs | |
// SPDX-License-Identifier: MIT | |
// usage: gjs shell_object_sample.js | |
const { GIRepository, GLib, Gio } = imports.gi; | |
function findLib(path, prefix) { | |
const libdir = Gio.File.new_for_path(path); | |
const files = libdir.enumerate_children('', Gio.FileQueryInfoFlags.NONE, null); | |
for (; ;) { |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
// ------ | |
// Broadcasts discovery requests for Logitech Media Server and listens to replies and publish messages | |
// will send all updates as a hash to the callback. | |
// The content of the hash is | |
// IPAD: The address of the server | |
// NAME: The name of the server | |
// JSON: The port to connect to for the JSON API | |
// UUID: The unique identifier of the server instance. | |
// ------ | |
const GLib = imports.gi.GLib; |