-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
| struct Input | |
| { | |
| float2 TexCoord : TEXCOORD0; | |
| float4 Color : TEXCOORD1; | |
| }; | |
| struct Output | |
| { | |
| float4 Color : SV_Target0; | |
| }; |
| using System; | |
| using System.Collections.Generic; | |
| using Windows.System; | |
| using Windows.Storage.Streams; | |
| using Windows.Services.Store; | |
| using Windows.Gaming.XboxLive.Storage; | |
| using Microsoft.Xbox.Services; | |
| using Microsoft.Xbox.Services.System; | |
| using Microsoft.Xbox.Services.Presence; | |
| using Microsoft.Xbox.Services.Statistics.Manager; |
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)
2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
- * Instead of using
suto runulimiton the nginx account, useps aux | grep nginxto locate nginx's process IDs. Then query each process's file handle limits usingcat /proc/pid/limits(wherepidis the process id retrieved fromps). (Note:sudomay be necessary on your system for thecatcommand here, depending on your system.) - Added
fs.file-max = 70000to /etc/sysctl.conf
| /* | |
| * Random-Number Utilities (randutil) | |
| * Addresses common issues with C++11 random number generation. | |
| * Makes good seeding easier, and makes using RNGs easy while retaining | |
| * all the power. | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015-2022 Melissa E. O'Neill | |
| * |
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
| # replace file basename with a UUID when uploaded | |
| # e.g.: avatar.jpg becomes 41bf830f-80cf-4efe-ad90-3b29bc6708b5.jpg | |
| # but don't regenerate a UUID each time file url is accessed | |
| class User < ActiveRecord::Base | |
| has_attached_file :avatar, path: ":basename.:extension" | |
| before_validation { set_avatar_file_name } | |
| def set_avatar_file_name | |
| # replace any NEW filename with a UUID |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ======= Prolbem ================================================================================================================= | |
| I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
| rake db:create , command I get: | |
| PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
| HINT: Use the same encoding as in the template database, or use template0 as template. | |
| : CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
| bin/rake:16:in `load' |
| // = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
| // = How to compile: | |
| // % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
| // % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
| // % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
| // -licuuc -lz -lbz2 | |
| #include <cassert> | |
| #include <cctype> | |
| #include <iostream> | |
| #include <memory> |

