This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo /etc/init.d/transmission-daemon stop | |
sudo chown -R pi:pi /etc/transmission-daemon | |
sudo rm -rf ~pi/.config/transmission-daemon | |
sudo mv /etc/transmission-daemon ~pi/.config/ | |
sudo ln -s ~pi/.config/transmission-daemon /etc/transmission-daemon | |
sudo chown pi:pi /etc/default/transmission-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext } from 'react'; | |
import * as constants from './constants'; | |
const ExampleContext = createContext(); | |
const { Consumer, Provider } = ExampleContext; | |
const UserProvider = ({ children }) => { | |
return <Provider value={{}}>{children}</Provider>; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MediaQueryListener { | |
afterElement = window.getComputedStyle ? window.getComputedStyle(document.body, ':after') : false; | |
currentBreakpoint = ''; | |
lastBreakpoint = ''; | |
constructor() { | |
if(!this.afterElement) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name yoursite.com; | |
root /usr/share/html; | |
index index.html; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'css_splitter' | |
desc 'split css files' | |
namespace :css do | |
task :split do | |
infile = ENV['infile'] || raise("missing infile") | |
outdir = ENV['outdir'] || File.dirname(infile) | |
max_selectors = ENV['max_selectors'] || 4095 |