Development reference: Difference between revisions
No edit summary |
No edit summary |
||
Line 465: | Line 465: | ||
cd "C:\Michael's Data\development\sixth_column\boost_1_55_0" | cd "C:\Michael's Data\development\sixth_column\boost_1_55_0" | ||
bjam --toolset=msvc-12.0 address-model=32 --build-type=complete --stagedir=windows_lib\x86 stage | bjam --toolset=msvc-12.0 address-model=32 --build-type=complete --stagedir=windows_lib\x86 stage | ||
|} | |||
|} | |||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git | |||
|- | |||
| | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git use kdiff3 as difftool and mergetool | |||
|- | |||
| It's been made easy on linux... | |||
* LINUX - put this in ~/.gitconfig | |||
[diff] | |||
tool = kdiff3 | |||
[merge] | |||
tool = kdiff3 | |||
* WINDOZE | |||
[difftool "kdiff3"] | |||
path = C:/Progra~1/KDiff3/kdiff3.exe | |||
trustExitCode = false | |||
[difftool] | |||
prompt = false | |||
[diff] | |||
tool = kdiff3 | |||
[mergetool "kdiff3"] | |||
path = C:/Progra~1/KDiff3/kdiff3.exe | |||
trustExitCode = false | |||
[mergetool] | |||
keepBackup = false | |||
[merge] | |||
tool = kdiff3 | |||
* LINUX Before - What a ridiculous pita... copy this into .git/config... | |||
[difftool "kdiff3"] | |||
path = /usr/bin/kdiff3 | |||
trustExitCode = false | |||
[difftool] | |||
prompt = false | |||
[diff] | |||
tool = kdiff3 | |||
[mergetool "kdiff3"] | |||
path = /usr/bin/kdiff3 | |||
trustExitCode = false | |||
[mergetool] | |||
keepBackup = false | |||
[merge] | |||
tool = kdiff3 | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git create merge-to command | |||
|- | |||
| Add this handy alias command to all git repos' .config file... | |||
[alias] | |||
merge-to = "!gitmergeto() { export tmp_branch=`git branch | grep '* ' | tr -d '* '` && git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset tmp_branch; }; gitmergeto" | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git shared repo | |||
|- | |||
| There are two possibilities (I prefer the latter). | |||
# Bare repositories are designed to be shared. Maintenance on the central server is easier because you don't have local files to manage permissions or constant flux. Plus, you can always have a second repo on the central server where you check out a specific branch (e.g. to serve up with apache). | |||
# If you want to have a location on the central repo to see the files, use the master-daily pattern, and config the repo as shared: | |||
git config core.sharedRepository true | |||
To set it on a new git repo during initial setup, make sure devs are in the same group, and use: | |||
git init --shared=group | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git create new branch on server, pull to client | |||
|- | |||
| | |||
# ON CENTRAL SERVER | |||
git checkout master # as needed; we are assuming that master is clean enough as a starting point | |||
git checkout -b mynewbranchy | |||
# HOWEVER, use this instead if you need a new "clean" repo and even master is dirty... | |||
# You need the rm because git "leaves your working folder intact". | |||
git checkout --orphan mynewbranchy | |||
git rm -rf . | |||
# ON CLIENT | |||
git pull | |||
git checkout -b mynewbranchy origin/mynewbranchy | |||
# if files are in the way from the previously checked-out branch, you can force it... | |||
git checkout -f -b mynewbranchy origin/mynewbranchy | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git windows configure notepad++ editor | |||
|- | |||
| | |||
git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git pull when untracked files are in the way | |||
|- | |||
| This will pull, forcing untracked files to be overwritten by newly tracked ones in the repo: | |||
git fetch --all | |||
git reset --hard origin/mymatchingbranch | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git create new branch when untracked files are in the way | |||
|- | |||
| | |||
git checkout -b bj143 origin/bj143 | |||
git : error: The following untracked working tree files would be overwritten by checkout: | |||
(etc) | |||
TOTAL PURGE FIX (too much): | |||
git clean -d -fn "" | |||
-d dirs too | |||
-f force, required | |||
-x include ignored files (don't use this) | |||
-n dry run | |||
BEST FIX (just overwrite what is in the way): | |||
git checkout -f -b bj143 origin/bj143 | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git fix push behavior - ONLY PUSH CURRENT doh | |||
|- | |||
| | |||
git config --global push.default current | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git recreate repo | |||
|- | |||
| | |||
git clone ssh://m@thedigitalmachine.com/home/m/development/thedigitalage/ampache-with-hangthedj-module | |||
cd ampache-with-hangthedj-module | |||
git checkout -b daily_grind origin/daily_grind | |||
If you already have the daily_grind branches and just need to connect them: | |||
git branch -u origin/daily_grind daily_grind | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! git connect to origin after the fact | |||
|- | |||
| | |||
git remote add origin ssh:// m@bitpost.com/home/m/development/logs | |||
git fetch | |||
From ssh:// bitpost/home/m/development/logs | |||
* [new branch] daily_grind -> origin/daily_grind | |||
* [new branch] master -> origin/master | |||
git branch -u origin/daily_grind daily_grind | |||
git checkout master | |||
git branch -u origin/master master | |||
|} | |} | ||
|} | |} | ||
Line 643: | Line 794: | ||
|} | |} | ||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" |
Revision as of 00:45, 8 October 2015
FAST in-memory handling of large amount of data that must be persisted |
---|
This is an extremely common pattern. Remember these fundamental rules:
|
C++ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
git | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
php debugging |
---|
Tail these:
tail -f /var/log/apache2/sitelogs/thedigitalage.org/ssl_error_log tail -f /var/log/ampache-tda/ampache.(today).log |
This leads to too much noise, not needed...
emacs /etc/php/apache2-php5.3/php.ini display_errors = On /etc/init.d/apache restart |
Eclipse | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
emacs configuration |
---|
This common config should work well in both terminal and UI:
/home/m/development/config/common/home/m/.emacs NOTE that you need some other things to be configured properly:
export TERM=xterm-256color
|
SQL Server 2008+ proper upsert using MERGE |
---|
-- We need an "upsert": if record exists, update it, otherwise insert. -- There are several options to do that. -- Trying to do it correctly means... -- 1) use a lock or transaction to make the upsert atomic -- 2) use the best-available operation to maximize performance -- SQL Server 2008 has MERGE which may be slightly more efficient than -- separate check && (insert||update) steps. And we can do it with -- a single lock instead of a full transaction (which may be better?). -- It's messy to code up though since three blocks of fields must be specified. -- Cest la vie. MERGE [dbo].[FACT_DCSR_RemPeriodMonthlyReport] WITH (HOLDLOCK) AS rpmr USING (SELECT @ID AS ID) AS new_foo ON rpmr.ID = new_foo.ID @last_months_year as DCSRYear, @last_month as DCSRMonth, @last_month_name as MonthName, Device_Type_ID, WHEN MATCHED THEN UPDATE SET f.UpdateSpid = @@SPID, UpdateTime = SYSDATETIME() WHEN NOT MATCHED THEN INSERT ( ID, InsertSpid, InsertTime ) VALUES ( new_foo.ID, @@SPID, SYSDATETIME() ); |
Windows command prompt FULL SCREEN |
---|
Type cmd in start search box and right-click on the cmd shortcut which appears in the results. Select Run CMD as administrator.
Next, in the command prompt, type wmic and hit Enter. Now try to maximize it! Close it and again open it. It will open as a maximized window! You may have to ensure that the Quick Edit Mode in the Options tab is checked. |
bash chmod dirs |
---|
find /path/to/base/dir -type d -exec chmod g+x {} \; |
Web Services |
---|
Firefox Addon development |
---|
mediawiki collapsible skeleton |
---|
#replace# |
mediawiki collapsible example |
---|
DJs are kept on the active Active djs are maintained Active djs are maintained Active djs are maintained Active djs are maintained Active djs are maintained Active djs are maintained djs list when both the server and the dj are enabled. |
All djs are shown in the prefs djs list.
Line 2 Line 3 All djs are shown in the prefs djs list.All djs are shown in the prefs djs list.All djs are shown in the prefs djs list.All djs are shown in the prefs djs list.All djs are shown in the prefs djs list. cd /var/www/localhost/htdocs/mediawiki emacs LocalSettings_redirector.php (to hardcode each site) php maintenance/update.php (repeat for each site) emacs LocalSettings_redirector.php (to reset dynamic behavior) |