Skip to content

Instantly share code, notes, and snippets.

View salami-art's full-sized avatar

salami-art

View GitHub Profile
get 'posts/:main-taxonomy/old-taxonomy', to: redirect('posts/%{main-taxonomy}/new-taxonomy', :status => 301)
get 'posts/:main-taxonomy/previous-other-taxonomy', to: redirect('posts/%{main-taxonomy}/new-taxonomy', :status => 301)
get 'posts/:main-taxonomy/old-taxonomy/:province', to: redirect('posts/%{main-taxonomy}/new-taxonomy/%{province}', :status => 301)
get 'posts/:main-taxonomy/previous-other-taxonomy/:province', to: redirect('posts/%{main-taxonomy}/new-taxonomy/%{province}', :status => 301)
export class MyCustomType {
...
}
export class MyCustomTypeManager {
public list: Array<(data: string) => MyCustomType>;
public new(input : string, settings? : Object) {
return new MyCustomType(input, settings);
}
public getByName(name) {
import React from "react";
import { Link } from 'gatsby'
import MainSearchInput from "../components/main_search";
class Navbar extends React.Component {
_isMounted = false;
constructor() {
super()
this.state = {
searchBarShown: false,
import React from "react";
import { Link } from 'gatsby'
class PostsIterator extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
import React from 'react'
// import { Link } from 'gatsby'
import Layout from '../components/layout'
import PostsList from '../components/posts_list'
import PostsFilter from '../components/posts_filter'
const IndexPage = (data) => {
console.log('Index.js', data.length)
return (
<Layout>
@salami-art
salami-art / Error
Last active September 24, 2018 18:41
./src/components/event_form.js
Module Error (from ./node_modules/eslint-loader/index.js):
/Users/me/gatsby-site/src/components/event_form.js
29:5 error Parsing error: Unexpected token
27 |
28 | render = () => {
> 29 | let form = this.props.formData;
| ^
class Font < ApplicationRecord
has_many :styles_fonts
has_many :styles, through: :styles_fonts
end
class Rating::Option < ApplicationRecord
belongs_to :rating_type, class_name: 'Rating::Type', :foreign_key => "rating_type_id"
has_many :rating_scores, class_name: 'Rating::Score', :foreign_key => "rating_option_id", dependent: :destroy
end
def render_tabs_wrapper
content_tag :ul, class: 'nav nav-tabs' do
content_tag( :li, 'v-sticky': 'value' ) do; ""; end + yield
end
end
<?php
require_once('../../obj/XmlGeocms.php');
require_once('../../obj/Geo.php');
require_once('../../input/stream/Stream.php');
require_once('config.php');
$requestURI = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$requestURI = explode("/", $requestURI);
$app = $requestURI[4];
if(empty($app)){ echo "app number is empty!"; die(); }