https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
require 'webrick' | |
server = WEBrick::HTTPServer.new(Port: 8080) | |
server.mount_proc '/' do |req, res| | |
res.body = req.body | |
end | |
server.start |
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |
# encoding: UTF-8 | |
# Place in config/deploy.rb | |
namespace :rails do | |
desc "Open the rails console on each of the remote servers" | |
task :console do | |
on roles(:app) do |host| #does it for each host, bad. | |
rails_env = fetch(:stage) | |
execute_interactively "ruby #{current_path}/script/rails console #{rails_env}" |
module AllCacheKey | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def cache_key | |
pluck("COUNT(*)", "MAX(updated_at)").flatten.map(&:to_i).join("-") | |
end | |
end | |
end |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{