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
def checkconfig(): | |
from configparser import ConfigParser | |
import cfg | |
config = ConfigParser() | |
config.read('config.ini') | |
if config['DEFAULT'] == {}: | |
cfg.addtwitter() | |
else: | |
tack = config['DEFAULT']['twitter_api_consumer_key'] | |
tacs = config['DEFAULT']['twitter_api_consumer_secret'] |
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, { Component } from 'react'; | |
import { FlatList } from 'react-native'; | |
import styled from 'styled-components'; | |
const Header = styled.Text` | |
color: white; | |
font-size: 24; | |
`; | |
const CatItem = styled.Text` |
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
%hook UIWindow | |
-(void)layoutSubviews { | |
%orig; | |
[self setClipsToBounds:YES]; | |
[self.layer setCornerRadius:25.0f]; | |
CAGradientLayer *gradient = [CAGradientLayer layer]; | |
CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init]; | |
self.layer.cornerRadius = 25.0f; | |
self.layer.shadowColor = [UIColor blueColor].CGColor; |
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
echo "alias uicache='sudo rm -rfv /Library/Caches/com.apple.iconservices.store >> /dev/null; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \ >> /dev/null; ; sleep 3;sudo touch /Applications/* >> /dev/null; killall Dock; killall Finder; echo Cache Refreshed;'" >> ~/.zshrc |
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
curl -s https://macthemes.co/install-mti.sh | sudo sh |
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
cd <PATH_TO_BUNDLE_ROOT> | |
ls | |
# expect bundle to be shown in output | |
sudo easy_mount | |
sudo mti-cli -i -t <THEME_BUNDLE_NAME>.bundle | |
# TO UNINSTALL | |
sudo mti-cli -u -t <THEME_BUNDLE_NAME>.bundle |
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 os | |
import time | |
import subprocess | |
while True: | |
output = subprocess.check_output(['istats', 'cpu']) | |
output1 = subprocess.check_output(['istats', 'fan']) | |
output2 = subprocess.check_output(['istats', 'battery']) | |
new_output = '\n\n\n' + str(output.decode('utf-8')) + '\n' + str(output1.decode('utf-8')) + '\n' + str(output2.decode('utf-8')) | |
print(new_output.replace('For more stats run `istats extra` and follow the instructions.', '')) |
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
# On Python3 run: `pip3 install dnspython` | |
import dns.resolver | |
import re | |
def verify_email(email): | |
regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$' | |
if re.search(regex,email): | |
pass | |
else: |
OlderNewer