Skip to content

Instantly share code, notes, and snippets.

{
id: 7454,
created_at: "2015-06-01T19:57:42.751Z",
slug: "timur-fattahov",
username: "Timur Fattahov",
first_name: "Timur",
last_name: "Fattahov",
full_name: "Timur Fattahov",
avatar: "https://arena-avatars.s3.amazonaws.com/7454/small_053aace3b95000570b920a8cba8dcf6b.jpg?1544505138",
avatar_image: {
@tttimur
tttimur / html.html
Last active October 21, 2020 19:43
Marquee!
<style lang="scss">
.carousel {
width: 100vw;
overflow: hidden;
.carousel-animation {
width: 50000px;
overflow: visible;
@tttimur
tttimur / index.js
Last active June 10, 2020 16:28
Prismic and next's demo
import { getPage } from '../api/prismic'
import Homempage from '../components/Homepage'
const Index = ({ page }) => <Homepage {...page} />
// to generate props during build time,
// can be replaced with getServerSideProps
Index.getStaticProps = async () => {
const page = await getPage('support')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tttimur
tttimur / cdf
Last active June 7, 2019 20:08
copy cdf
cdf() {
cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
}
Step 1
--
Create new user
Step 2
--
Add user to mysql
`CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';`
`GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';`
`FLUSH PRIVILEGES;`
@tttimur
tttimur / cms.js
Last active May 20, 2019 19:15
4ye collections
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({
@tttimur
tttimur / searx-localinstall.md
Created January 15, 2019 19:14
How to setup searx locally without docker to edit the webapp for theming

Closed, but wanted to mention how I got this to work

  1. Make sure you have python 2 installed
  2. Open file ./manage.sh and edit line 21 pip install --user "$BASE_DIR/requirements.txt" to include --user flag
  3. Run command in your cli ./manage.sh update_packages to install all the dependencies
  4. Open file ./searx/settings.yml and changed debug: True in general
  5. Install Flask
  6. cd searx && export FLASK_APP=webapp.py && flask run
const gr8 = require('gr8')
const recsst = require('recsst')
const lilcss = require('lilcss')
const colors = {
white: '#fff',
black: '#000',
grey: '#ccc'
}