Skip to content

Instantly share code, notes, and snippets.

View klan's full-sized avatar

Klaus Nielsen klan

  • Odense
View GitHub Profile
@CodingDoug
CodingDoug / README.md
Last active August 3, 2023 16:41
Copying Data from a Google Sheet into Firebase Realtime Database in real time via Apps Script
@CodingDoug
CodingDoug / README.md
Last active December 17, 2022 10:23
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions
Update and install requirements:
› sudo apt-get update
› sudo apt-get dist-upgrade
› sudo apt-get install matchbox chromium x11-xserver-utils ttf-mscorefonts-installer xwit sqlite3 libnss3
Curl to desktop, cat file and copy-paste into existing files:
› curl -L --output /home/pi/Desktop/config.txt --get https://gist.githubusercontent.com/klan/7482956/raw/ebe5b60527aad2bec93e23035cbc07ee5b6a3d9b/config.txt
› curl -L --output /home/pi/Desktop/rc.local --get https://gist.githubusercontent.com/klan/7482956/raw/33786a1c5c9448bf30cd037950169679a718fb79/rc.local
Curl new file to location:
@klan
klan / Setting up subdomain with Drupal installation on Linode
Created October 30, 2013 11:39
How to set up a subdomain on a Linode server with a Drupal installation and a repository
• SSH to your server to start creating a subdomain (https://library.linode.com/hosting-website#sph_configuring-name-based-virtual-hosts)
• Go to ~/public/
› mkdir -p sub.example.com/{public,log,backup}
› cd sub.example.com/public/
› nano index.html | nano index.php
• Write 'Hello world' or whatever, we just need a html|php file to test with
@LarsEliasNielsen
LarsEliasNielsen / markup.tpl.php
Last active December 26, 2015 07:59
Ctools Content Type for Panels (pane). Adding stylesheets and scripts in pane. Variables can be set in pane, and extended to scripts. Markup is stored in a standard template file, with parsed variables.
<?php
/**
* @file
* Markup template.
* This is placed in: my_module/plugins/panes/resources/
*/
?>
<div>
<div class="my_output"></div>
@klan
klan / Google Power Search Class
Created October 22, 2013 11:46
Google Power Search Class
• define […]
- Defines a word, in english, also on the danish site
• #[…]
- Searches the web for hashtags
• +[…]
- Searches Google+
• $[…]
- Given a number, searches for a price
• @[…]
- Given a name, seaches for people (on mostly social networks)
@klan
klan / Installing Drupal with drush
Created October 22, 2013 09:20
Step-by-step Drupal install with drush. Includes installation of: Omega theme (and sub-theme), Adminimal theme, Adminimal admin menu, Module Filter, Views, Context, ctools, Devel, Diff, Features, Entity API, Entity Reference, jQuery Update, Pathauto and Token.
› drush dl drupal --drupal-project-rename="projectname"
• Install site
› cd projectname/sites/all/modules/
› mkdir contrib custom
› drush dl adminimal_theme adminimal_admin_menu module_filter
› drush en -y adminimal_admin_menu module_filter
› drush variable-set admin_theme adminimal
@bubenkoff
bubenkoff / checkpoint.sh
Last active July 24, 2024 07:45
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
#
# Usage: ./checkpoint.sh
#
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.