This file contains hidden or 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/sh | |
wget https://gist.githubusercontent.com/arbaaz/8d6f1317ee735cfe6d707ba72ad8848c/raw/98f2546ab980c7d738d5e3eb94cbb736aa1905ca/telegram | |
chmod +x telegram | |
mv telegram /usr/local/bin/telegram |
This file contains hidden or 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 'active_support' | |
module CRUDActions | |
extend ActiveSupport::Concern | |
included do | |
before_action :set_resource, only: [:show, :update, :destroy] | |
end | |
# Returns count of records matching the scope | |
def count |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until the script has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
install_thoughtbot() { | |
mkdir -p "$HOME/installer/logs" && cd "$HOME/installer" |
This file contains hidden or 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
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} |
This file contains hidden or 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
export const isNotEmpty = R.complement(R.isEmpty); | |
export const isNotNil = R.complement(R.isNil); | |
export const isTruthy = R.both(isNotEmpty, isNotNil); | |
export const findObject = R.curry((predicate, filterableObject) => { | |
return R.reduce( | |
(acc, key) => { | |
if (predicate(filterableObject[key])) { | |
return R.reduced(filterableObject[key]); | |
} | |
return acc; |
This file contains hidden or 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
https://deckofcardsapi.com/api/deck/new/shuffle/?cards=AS,2S,5C,3C,KD,AH,QH,2C,KS,8C |
This file contains hidden or 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
sudo apt install -y git | |
sudo apt-get install libxss1 libappindicator1 libindicator7 | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb | |
sudo apt-get install gnome-tweaks | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg |
This file contains hidden or 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
echo "{}" > composer.json | |
echo "<?php header( 'Location: /index.html' ) ; ?>" > index.php |
This file contains hidden or 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
-- json : String | |
-- json = | |
-- """ | |
-- { | |
-- "kind": "Listing", | |
-- "data": { | |
-- "children": [ | |
-- {"data":{"url":"http://www.example.com", "title":"hello"}}, | |
-- {"data":{"url": "http://www.example.com", "title":"world"}} |
This file contains hidden or 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
Open the developer console and run this command. | |
document | |
.querySelectorAll('.topic_follow_button') | |
.forEach(node => !node.text.includes('Followi') && node.click()) |