Say you have a 1GB text file (words.txt) and has a word each line. Like this
1. John
2. Doe
3. Jane
4. Smith
<?php | |
define('FORCE_SSL_ADMIN', true); | |
if ( (isset($_SERVER['HTTP_X_FORWARDED_PORT'] ) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] )) | |
|| (isset($_SERVER['HTTP_CF_VISITOR']) && $_SERVER['HTTP_CF_VISITOR'] == '{"scheme":"https"}')) { | |
$_SERVER['HTTPS'] = 'on'; | |
} | |
/** | |
* Rest of the wp-config.php below. | |
*/ |
[program:gogs] | |
directory = /home/gogs/gogs-repositories | |
command=/usr/bin/gogs run web | |
autostart=true | |
autorestart=true | |
startsecs=10 | |
stdout_logfile=/var/log/gogs/stdout.log | |
stdout_logfile_maxbytes=1MB | |
stdout_logfile_backups=10 | |
stdout_capture_maxbytes=1MB |
{ | |
"title" : "//*[@id='productTitle']" | |
} |
This gist is in response to a question asked on the Reddit Angular JS forum about how to structure an Angular app with roles and permissions.
There are many ways to approach this, but I'll share one that I've used before and maybe it will give you an idea. I'd combine all of the above into a single app and control who gets to see what using permissions. There are a few components to this approach...
First off I'd advise creating some sort of local session management service. This should be able to track whether you have an authenticated user and- if so- what types of permissions that user has. (Lots of ways to manage permissions. I'll assume your user object has either a 'role' enum or something simple like an array of string permissions.) You could roll your own session service or you could check out something like satellizer.
Let's assume yo
window_root "~/Code/Project" | |
# Create new window. If no argument is given, window name will be based on | |
# layout file name. | |
new_window "canon" | |
# Split window into panes. | |
split_h 50 | |
split_v 50 1 | |
split_v 50 2 |
<select name="countries"> | |
<option value="DE">Deutschland</option> | |
<option value="AT">Österreich</option> | |
<option value="CH">Schweiz</option> | |
<option value="LU">Luxemburg</option> | |
<option value="AF">Afghanistan</option> | |
<option value="EG">Ägypten</option> | |
<option value="AX">Åland</option> | |
<option value="AL">Albanien</option> | |
<option value="DZ">Algerien</option> |
https://images.unsplash.com/photo-1448318440207-ef1893eb8ac0 | |
https://images.unsplash.com/photo-1447678523326-1360892abab8 | |
https://images.unsplash.com/photo-1445754574409-bcd715e18017 | |
https://images.unsplash.com/photo-1444682717031-a2498d603d5b | |
https://images.unsplash.com/photo-1442405740009-7b57cca9d316 | |
https://images.unsplash.com/photo-1439337153520-7082a56a81f4 | |
https://images.unsplash.com/photo-1433832597046-4f10e10ac764 | |
https://images.unsplash.com/photo-1430651717504-ebb9e3e6795e | |
https://images.unsplash.com/photo-1428190318100-06790c8b2e5a | |
https://images.unsplash.com/photo-1422504090664-c57eba84293f |
<html> | |
<head> | |
<script src="js-1.js"></script> | |
<script src="js-2.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> | |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |