Skip to content

Instantly share code, notes, and snippets.

@thefuxia
thefuxia / t5-page-feed.php
Created May 22, 2012 00:47
Newsfeed for post type 'page'
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Page Feed
* Description: Adds a feed for pages at <code>/feed/?post_type=page</code>.
* Version: 2012.05.22
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
@ryan-roemer
ryan-roemer / app.yaml
Created January 6, 2012 13:39 — forked from darktable/app.yaml
App.yaml designed for serving an authenticated, static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May n
# App configuration for static site with auth.
#
# Originally from: https://gist.github.com/873098
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
@rambabusaravanan
rambabusaravanan / README.md
Last active March 6, 2021 13:37
GitLab CI Configuration YAML

Firebase Deployment

Step 1: Get Token

Generate the firebase token from your terminal using the command $ firebase login:ci

Waiting for authentication...

✔ Success! Use this token to login on a CI server:

1/VXXXXXXX--YOUR-FIREBASE-CI-TOKEN--XXXXXh92o

@nicdoye
nicdoye / mysqlbackup.sh
Created February 2, 2013 13:07
Backup your OpenShift MySQL database. My DB is only small so I didn't bother to compress it through a pipe. sftp it back from your local machine afterwards This is basically a quick hack from running "type mysql" on the OpenShift gear - hint: it's a bash function/alias
mkdir ~/app-root/data/tmp
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql
@ivantw08
ivantw08 / angular material
Last active November 25, 2021 22:28
A module with all Angular module.
//Simply to import to app.module.ts and start to use all angular
// by this way is easier to maintenance you app.module
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
import {MatInputModule} from '@angular/material/input';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatFormFieldModule} from '@angular/material/form-field';
@aeron7
aeron7 / style.css
Last active January 24, 2022 07:41
Zerodha Kite Dark Mode
div.page-content.positions {
background-color: #000000;
color: #ffffff;
}
h3.page-title.small {
color: #ffffff;
}
span.text-label.small.aqua.indigo {
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get purge lxc-docker*
sudo apt-get purge docker.io*
@oliverdoetsch
oliverdoetsch / AND_OR_NOT
Last active January 22, 2023 17:03
Blogger: Globally conditional data tags for all page types
#AND
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
#OR
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@eneajaho
eneajaho / Optimized SEO header for Blogger
Created July 18, 2017 16:34
This Optimized SEO header for Blogger will rank you higher in search results.
<!-- [ Meta Tag SEO ] -->
<include expiration='7d' path='*.css'/>
<include expiration='7d' path='*.js'/>
<include expiration='3d' path='*.gif'/>
<include expiration='3d' path='*.jpeg'/>
<include expiration='3d' path='*.jpg'/>
<include expiration='3d' path='*.png'/>
<meta content='sat, 02 jun 2020 00:00:00 GMT' http-equiv='expires'/>
<meta charset='utf-8'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>